]> andersk Git - sql-web.git/blobdiff - lib/dbaccess.lib.php
bug: dropping database outside the interface stops interface for all users
[sql-web.git] / lib / dbaccess.lib.php
index a3211a11a6986f3cb2b76406f3e9ee0e6838bd33..696cdfe71d76e3d77210f4ce8913d43d2415ac41 100644 (file)
@@ -32,8 +32,11 @@ function DBSet($sql) { DBInsert($sql); }
 function DBShow($sql) { return DBSlave($sql); }
 
 function calcDBSize($tdb) {
+       $sql_result = "SHOW DATABASES LIKE '".mysql_escape_string($tdb)."'";
+       $result = DBShow($sql_result);
+       if (!mysql_num_rows($result)) return null;
+       
    $sql_result = "SHOW TABLE STATUS FROM `" .mysql_escape_string($tdb)."`";
-//   $result = @mysql_db_query($tdb,$sql_result);
    $result = DBShow($sql_result);
 
    if($result) {
This page took 0.311221 seconds and 4 git commands to generate.