From 3fc8fa4a45d738fb154eb38fa5129a78fe109a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=BCller?= Date: Tue, 21 Aug 2001 07:02:24 +0000 Subject: [PATCH] db_stats.php3: added list of 20 biggest db's --- ChangeLog | 3 +++ db_stats.php3 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f51ca8dce..eb27465fc 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-08-21 Olivier Müller + * db_stats.php3: added list of 20 biggest db's + 2001-08-21 Loïc Chapeaux * db_stats.php3: ensured the script is XHTML1.0 compliant and fits the coding standards. diff --git a/db_stats.php3 b/db_stats.php3 index 718090d24..b5cd00fac 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -87,11 +87,18 @@ header('Content-Type: text/html; charset=' . $charset);

- + + + + +
+ + - + @@ -105,6 +112,7 @@ if ($num_dbs > 1) { $big_tot_all = 0; $big_tot_idx = 0; $big_tot_data = 0; + $results_array = array(); // Gets and displays the tables stats per database for ($i = 0; $i < $num_dbs; $i++) { @@ -134,10 +142,12 @@ if ($num_dbs > 1) { $tot_data += $row['Data_length']; $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; + $results_array[$db] = $tot_all; } list($tot_data_format,$unit_data) = format_byte_down($tot_data,3,1); @@ -167,6 +177,52 @@ if ($num_dbs > 1) { echo '' . "\n"; echo '
     + ASC + +         
' . "\n"; + + // Display 20 biggest db's + + ?> + +
      + + + + + + + + + + ' . "\n"; + echo ' ' . "\n"; + echo ' ' . "\n"; + echo ' ' . "\n"; + echo '' . "\n"; + } + + echo '
       + ASC +   +
 ' . $j . '  ' . urlencode($key) . '  ' . $disp_val . ' ' . $unit . ' 
' . "\n"; + echo '
'; + } // end if ($num_dbs == 1) else {