From 68441f2de0b668b67c71253c2f594f5e6edbc81c Mon Sep 17 00:00:00 2001 From: Stephan Poehlsen Date: Fri, 25 Nov 2005 23:29:25 +0000 Subject: DB stats in index.php git-svn-id: file:///home/lennart/svn/public/sse/trunk@61 5fbabb74-0606-0410-a5e4-b5cc6a42724e --- www/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/www/index.php b/www/index.php index e97e394..a27fd0f 100644 --- a/www/index.php +++ b/www/index.php @@ -51,16 +51,17 @@ ECHOFORM; db_connect(); -$identifier = 0; + +$stats = array(); $res = mysql_query("SHOW TABLE STATUS"); if ($res) { while ($r = mysql_fetch_array($res)) { - if ($r['Name'] == 'word') $identifier = $r['Rows']; + $stats[$r['Name']] = $r['Rows']; } } -if ($identifier) { - echo('

'.$identifier." in DB

\n"); +foreach ($stats as $table => $n) { + echo('

'.intval($n)." in ".htmlentities($table)."

\n"); } -- cgit