=3.23){
$query="show table status from $db";
$result=mysql_query($query);
}
if($num_tables == 0)
{
echo $strNoTablesFound;
}
// shows all tables faster on high traffic sites
// and views table size - staybyte - 9 June 2001
else if (MYSQL_MAJOR_VERSION>=3.23 && $result!=false && mysql_num_rows($result)>0){
echo "
\n";
echo "".UCFirst($strTable)." | ";
echo "$strAction | ";
echo "$strRecords | ";
// temporary
if (!empty($strSize)) echo "$strSize | ";
else echo " | ";
$i=0;
while ($sts_data=mysql_fetch_array($result)){
$table=$sts_data["Name"];
$query = "?server=$server&lang=$lang&db=$db&table=$table&goto=db_details.php3";
$bgcolor = $cfgBgcolorOne;
$i++ % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
echo "\n";
?>
|
&pos=0"> |
|
|
|
&zero_rows="> |
&zero_rows="> |
".$sts_data["Rows"]."\n";
$tblsize=$sts_data["Data_length"]+$sts_data["Index_length"];
if ($tblsize>1000000000) $tblsize_format=number_format(round($tblsize/107374182.4)/10,1,','.')." GB";
else if ($tblsize>1000000) $tblsize_format=number_format(round($tblsize/104857.6)/10,1,','.')." MB";
else if ($tblsize>1000) $tblsize_format=number_format(round($tblsize/102.4)/10,1)." KB";
echo " ";
echo "";
echo $tblsize_format." | \n";
echo "
\n";
}
echo "
\n";
}
else
{
$i = 0;
echo "\n";
echo "$strTable | ";
echo "$strAction | ";
echo "$strRecords | ";
while($i < $num_tables)
{
$table = mysql_tablename($tables, $i);
$query = "?server=$server&lang=$lang&db=$db&table=$table&goto=db_details.php3";
$bgcolor = $cfgBgcolorOne;
$i % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
?>
|
&pos=0"> |
|
|
|
&zero_rows="> |
&zero_rows="> |
|
\n";
}
$query = "?server=$server&lang=$lang&db=$db&goto=db_details.php3";
?>