diff --git a/db_details.php3 b/db_details.php3 index 277903866..fd1329dca 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -15,10 +15,53 @@ else $tables = mysql_list_tables($db); $num_tables = @mysql_numrows($tables); +if (MYSQL_MAJOR_VERSION>=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 "
".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 " | |||
---|---|---|---|---|---|---|---|
+ | &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 "