regards capability of mysql installation to view different table types

This commit is contained in:
Steve Alberty
2001-06-11 11:15:26 +00:00
parent 933d84d4ef
commit 367f225466
2 changed files with 53 additions and 19 deletions

View File

@@ -197,29 +197,46 @@ for($i=0 ; $i<$num_fields; $i++)
?> ?>
</table> </table>
<?php <?php
if($action == "tbl_create.php3" && MYSQL_MAJOR_VERSION == "3.23") if($action == "tbl_create.php3" && MYSQL_MAJOR_VERSION >= "3.23")
{ {
echo "$strTableComments:<br>"; echo "$strTableComments:<br>";
?> ?>
<input type="text" name="comment" style="width: <?php echo $cfgMaxInputsize;?>" maxlength="80"> <input type="text" name="comment" style="width: <?php echo $cfgMaxInputsize;?>" maxlength="80">
<?php <?php
} //BEGIN - Table Type - 2 May 2001 - Robbat2 - change by staybyte - 11 June 2001
//BEGIN - Table Type - 2 May 2001 - Robbat2
if($action == "tbl_create.php3") if($action == "tbl_create.php3")
{ {
// find mysql capability - staybyte - 11. June 2001
$query="SHOW VARIABLES like 'have_%'";
$result=mysql_query($query);
if ($result!=false && mysql_num_rows($result)>0){
while($tmp=mysql_fetch_array($result)){
if (isset($tmp["Variable_name"])) switch ($tmp["Variable_name"]){
case 'have_bdb': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_bdb=true; break;
case 'have_gemini': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_gemini=true; break;
case 'have_innodb': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_innodb=true; break;
case 'have_isam': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_isam=true; break;
}
}
}
echo $strTableType.":"; ?> echo $strTableType.":"; ?>
<select name="tbl_type"> <select name="tbl_type">
<option value="Default"><?php if (isset($strDefault)) echo $strDefault;?></option> <option value="Default"><?php if (isset($strDefault)) echo $strDefault;?></option>
<option value="BDB">BerkeleyDB</option> <?php
<?php // Not yet in MySQL <option value="GEMINI">Gemini</option> ?> ?>
<option value="HEAP">Heap</option>
<option value="ISAM">ISAM</option>
<?php // Not yet in MySQL <option value="InnoDB">InnoDB</option> ?>
<option value="MERGE">Merge</option>
<option value="MYISAM">MyISAM</option> <option value="MYISAM">MyISAM</option>
<option value="HEAP">Heap</option>
<option value="MERGE">Merge</option>
<?php if (isset($tbl_bdb)){ ?><option value="BDB">Berkeley DB</option><?php }?>
<?php if (isset($tbl_gemini)){ ?><option value="GEMINI">Gemini</option><?php }?>
<?php if (isset($tbl_innodb)){ ?><option value="InnoDB">INNO DB</option><?php }?>
<?php if (isset($tbl_isam)){ ?><option value="ISAM">ISAM</option><?php }?>
?>
</select> </select>
<?php <?php
} }
}
//END - Table Type - 2 May 2001 - Robbat2 //END - Table Type - 2 May 2001 - Robbat2
?> ?>
<p> <p>

View File

@@ -439,15 +439,15 @@ echo " </select>\n";
</td></tr></table> </td></tr></table>
</td></tr> </td></tr>
<?php <?php
if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=3) if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=22)
{ {
?> ?>
<tr><td valign=top><li>&nbsp;</td><td colspan=2> <tr><td valign=top><li>&nbsp;</td><td colspan=2>
<table><tr><td><?php echo $strTableMaintenance . ":"; ?> </td> <table border=0 cellspacing=0 cellpadding=0><tr><td><?php echo $strTableMaintenance . ":"; ?>&nbsp;</td>
<td><a href="sql.php3?sql_query=<?php echo urlencode("CHECK TABLE $table");?>&display=simple&<?php echo $query;?>"> <td><a href="sql.php3?sql_query=<?php echo urlencode("CHECK TABLE $table");?>&display=simple&<?php echo $query;?>">
<?php echo $strCheckTable; ?></a> <?php echo $strCheckTable; ?></a>
&nbsp;<?php echo show_docu("manual_Reference.html#CHECK_TABLE"); ?> &nbsp;<?php echo show_docu("manual_Reference.html#CHECK_TABLE"); ?>
</td><td>-</td> </td><td>&nbsp;-&nbsp;</td>
<td><a href="sql.php3?sql_query=<?php echo urlencode("ANALYZE TABLE $table");?>&display=simple&<?php echo $query;?>"> <td><a href="sql.php3?sql_query=<?php echo urlencode("ANALYZE TABLE $table");?>&display=simple&<?php echo $query;?>">
<?php echo $strAnalyzeTable; ?> <?php echo $strAnalyzeTable; ?>
</a>&nbsp;<?php echo show_docu("manual_Reference.html#ANALYZE_TABLE");?> </a>&nbsp;<?php echo show_docu("manual_Reference.html#ANALYZE_TABLE");?>
@@ -455,13 +455,15 @@ if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=3)
<td> <a href="sql.php3?sql_query=<?php echo urlencode("REPAIR TABLE $table");?>&display=simple&<?php echo $query;?>"> <td> <a href="sql.php3?sql_query=<?php echo urlencode("REPAIR TABLE $table");?>&display=simple&<?php echo $query;?>">
<?php echo $strRepairTable; ?> <?php echo $strRepairTable; ?>
</a>&nbsp;<?php echo show_docu("manual_Reference.html#REPAIR_TABLE"); ?> </a>&nbsp;<?php echo show_docu("manual_Reference.html#REPAIR_TABLE"); ?>
</td><td>-</td> </td><td>&nbsp;-&nbsp;</td>
<td><a href="sql.php3?sql_query=<?php echo urlencode("OPTIMIZE TABLE $table");?>&display=simple&<?php echo $query;?>"> <td><a href="sql.php3?sql_query=<?php echo urlencode("OPTIMIZE TABLE $table");?>&display=simple&<?php echo $query;?>">
<?php echo $strOptimizeTable; ?> <?php echo $strOptimizeTable; ?>
</a>&nbsp;<?php echo show_docu("manual_Reference.html#OPTIMIZE_TABLE"); </a>&nbsp;<?php echo show_docu("manual_Reference.html#OPTIMIZE_TABLE");
?> </td> </tr> </table> ?> </td> </tr> </table>
</td></tr> </td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td><li>&nbsp;</td><td><?php echo "$strTableComments:&nbsp;";?></td> <tr><td><li>&nbsp;</td><td><?php echo "$strTableComments:&nbsp;";?></td>
<td> <td>
<form method='post' action='tbl_properties.php3' style="margin:0px;"> <form method='post' action='tbl_properties.php3' style="margin:0px;">
@@ -476,19 +478,34 @@ if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=3)
</td></tr> </td></tr>
<tr><td><li>&nbsp;</td><td><?php echo "$strTableType:&nbsp;";?></td> <tr><td><li>&nbsp;</td><td><?php echo "$strTableType:&nbsp;";?></td>
<td> <td>
<?php
// modify robbat2 code - staybyte - 11. June 2001
$query="SHOW VARIABLES like 'have_%'";
$result=mysql_query($query);
if ($result!=false && mysql_num_rows($result)>0){
while($tmp=mysql_fetch_array($result)){
if (isset($tmp["Variable_name"])) switch ($tmp["Variable_name"]){
case 'have_bdb': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_bdb=true; break;
case 'have_gemini': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_gemini=true; break;
case 'have_innodb': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_innodb=true; break;
case 'have_isam': if (isset($tmp["Variable_name"]) && $tmp["Value"]=='YES') $tbl_isam=true; break;
}
}
}
?>
<form method='post' action='tbl_properties.php3' style="margin:0px;"> <form method='post' action='tbl_properties.php3' style="margin:0px;">
<input type="hidden" name="server" value="<?php echo $server;?>"> <input type="hidden" name="server" value="<?php echo $server;?>">
<input type="hidden" name="lang" value="<?php echo $lang;?>"> <input type="hidden" name="lang" value="<?php echo $lang;?>">
<input type="hidden" name="db" value="<?php echo $db;?>"> <input type="hidden" name="db" value="<?php echo $db;?>">
<input type="hidden" name="table" value="<?php echo $table;?>"> <input type="hidden" name="table" value="<?php echo $table;?>">
<select name='tbl_type'> <select name='tbl_type'>
<option <?php if($tbl_type == "BDB") echo 'selected';?> value="BDB">Berkeley DB</option>
<?php //Not in MySQL yet <option <?php if($tbl_type == "GEMINI") echo 'selected' ;? >value="GEMINI">Gemini</option> ?>
<option <?php if($tbl_type == "HEAP") echo 'selected';?> value="HEAP">Heap</option>
<option <?php if($tbl_type == "ISAM") echo 'selected';?> value="ISAM">ISAM</option>
<?php //Not in MySQL yet <option <?php if($tbl_type == "INNODB") echo 'selected' ;? > value="InnoDB">InnoDB</option> ?>
<option <?php if($tbl_type == "MRG_MYISAM") echo 'selected';?> value="MERGE">Merge</option>
<option <?php if($tbl_type == "MYISAM") echo 'selected';?> value="MYISAM">MyISAM</option> <option <?php if($tbl_type == "MYISAM") echo 'selected';?> value="MYISAM">MyISAM</option>
<option <?php if($tbl_type == "HEAP") echo 'selected';?> value="HEAP">Heap</option>
<?php if (isset($tbl_bdb)){ ?><option <?php if($tbl_type == "BDB") echo 'selected';?> value="BDB">Berkeley DB</option><?php }?>
<?php if (isset($tbl_gemini)){ ?><option <?php if($tbl_type == "GEMINI") echo 'selected';?> value="GEMINI">Gemini</option><?php }?>
<?php if (isset($tbl_innodb)){ ?><option <?php if($tbl_type == "INNODB") echo 'selected';?> value="INNODB">INNO DB</option><?php }?>
<?php if (isset($tbl_isam)){ ?><option <?php if($tbl_type == "ISAM") echo 'selected';?> value="ISAM">ISAM</option><?php }?>
<option <?php if($tbl_type == "MRG_MYISAM") echo 'selected';?> value="MERGE">Merge</option>
</select>&nbsp;<input type='submit' name='submittype' value='<?php echo $strGo; ?>'></form> </select>&nbsp;<input type='submit' name='submittype' value='<?php echo $strGo; ?>'></form>
</td></tr> </td></tr>
<?php <?php