diff --git a/config.inc.php3 b/config.inc.php3 index 80757a88f..de9077009 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -105,6 +105,7 @@ $cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' $cfgShowStats = TRUE; // allow to display statistics and space usage in // the pages about database details and table // properties +$cfgShowTooltip = TRUE; // display table comment as tooltip in left frame $cfgShowBlob = FALSE; // display blob field contents in browse mode $cfgShowAll = FALSE; // allows to display all the rows in browse mode diff --git a/left.php3 b/left.php3 index 5d46f43bb..206915df9 100755 --- a/left.php3 +++ b/left.php3 @@ -176,6 +176,15 @@ if ($num_dbs > 1) { $num_tables_disp = '-'; } + // Get additional infomation about tables for tooltip + if ($cfgShowTooltip && MYSQL_INT_VERSION >= 32303) { + $tooltip = array(); + $result = mysql_query("SHOW TABLE STATUS FROM $db"); + while ($tmp = mysql_fetch_array($result)) { + $tooltip[$tmp['Name']] = $tmp['Comment'] . ' (' . $tmp['Rows'] . ' rows)'; + } + } + // Displays the database name echo "\n"; echo '