diff --git a/ChangeLog b/ChangeLog index b5558fa87..a5b66acc0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,7 @@ $Source$ 2001-08-20 Olivier Müller * db_stats.php3: new file and feature (sorry :) : simply display - an overview of all databases with their respective size. + an overview of all databases with their respective size + server total. * lang/*: new string $strDatabasesStats 2001-08-20 Marc Delisle @@ -53,7 +53,7 @@ $Source$ * main.php3; db_details.php3; tbl_properties.php3; db_readdump.php3; lib.inc.php3: once a query has been executed phpMyAdmin now moves back to the calling script (rather than db_details.php3 everytime) as soon as - the current database/table exists, else it moves back to a "parent" + the current database/table exists, else it moves back to a "parent" script (the welcome page/'db_details.php3' if the current database/table has has been dropped. * header.inc.php3, lines 63-64; sql.php3; db_details.php3; @@ -61,7 +61,7 @@ $Source$ to the calling script (and not the target one used only if this statement is executed). * db_readdump.php3: improved Olivier's improvement for mutiple queries (see - before). + before). * lib.inc.php3, line 524: beautify a bit the way the query is displayed. * lang/english.inc.php3; lang/french.inc.php3: put $strInstructions at its right place. diff --git a/db_stats.php3 b/db_stats.php3 index a40eeb8e8..51145a76f 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -98,6 +98,9 @@ header('Content-Type: text/html; charset=' . $charset); 1) { $selected_db = 0; + $big_tot_all = 0; + $big_tot_idx = 0; + $big_tot_data = 0; // Gets the tables list per database for ($i = 0; $i < $num_dbs; $i++) { @@ -125,6 +128,9 @@ if ($num_dbs > 1) { $tot_idx += $row['Index_length']; } $tot_all = $tot_data + $tot_idx; + $big_tot_all += $tot_all; + $big_tot_idx += $tot_idx; + $big_tot_data += $tot_data; } list($tot_data_format,$unit_data) = format_byte_down($tot_data,3,1); @@ -139,6 +145,17 @@ if ($num_dbs > 1) { } + + list($tot_data_format,$unit_data) = format_byte_down($big_tot_data,3,1); + list($tot_idx_format,$unit_idx) = format_byte_down($big_tot_idx,3,1); + list($tot_all_format,$unit_all) = format_byte_down($big_tot_all,3,1); + + echo "" . $strSum . " "; + echo "$tot_data_format $unit_data "; + echo "$tot_idx_format $unit_idx "; + echo "$tot_all_format $unit_all "; + echo ""; + echo ""; } // end if ($num_dbs == 1)