From c18ce55dc85f62f38161298f2f5e5d66befc6886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=BCller?= Date: Thu, 30 Aug 2001 12:52:52 +0000 Subject: [PATCH] the "@" is needed! --- db_stats.php3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db_stats.php3 b/db_stats.php3 index 7ed0c483e..00b881da4 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -137,8 +137,10 @@ if ($num_dbs > 1) { $tot_all = 0; $local_query = 'SHOW TABLE STATUS FROM ' . $db_clean; $result = @mysql_query($local_query); - if (mysql_num_rows($result)) { - while ($row = mysql_fetch_array($result)) { + if (@mysql_num_rows($result)) { + // needs the "@": otherwise, warnings in case of special DB names: + // Warning: Supplied argument is not a valid MySQL result resource in db_stats.php3 on line 140 + while ($row = mysql_fetch_array($result)) { $tot_data += $row['Data_length']; $tot_idx += $row['Index_length']; }