summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Poehlsen <stephan@poehlsen.net>2005-11-25 23:29:25 +0000
committerStephan Poehlsen <stephan@poehlsen.net>2005-11-25 23:29:25 +0000
commit68441f2de0b668b67c71253c2f594f5e6edbc81c (patch)
treeb9907af38cfe2994c47b2feb55b84878982de4af
parentc8204cc501d09dc20ae6602cb2e33f1c108d7743 (diff)
DB stats in index.php
git-svn-id: file:///home/lennart/svn/public/sse/trunk@61 5fbabb74-0606-0410-a5e4-b5cc6a42724e
-rw-r--r--www/index.php9
1 files 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('<p><span id="identifier_in_db">'.$identifier."</span> in DB</p>\n");
+foreach ($stats as $table => $n) {
+ echo('<p style="display:none;"><span id="n_'.htmlentities(strtolower($table)).'">'.intval($n)."</span> in ".htmlentities($table)."</p>\n");
}