--- includes/database.mysql.inc
+++ includes/database.mysql.inc
@@ -354,7 +354,14 @@
   *   TRUE if the table exists, and FALSE if the table does not exist.
   */
  function db_table_exists($table) {
-  return (bool) db_fetch_object(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'"));
+  $table = explode('.', db_prefix_tables("{".db_escape_table($table)."}"));
+  if (count($table) > 1) {
+    $query = "SHOW TABLES IN ".$table[0]." LIKE '".$table[1]."'";
+  } else {
+    $query = "SHOW TABLES LIKE '".$table[0]."'";
+  }
+	
+  return (bool) db_fetch_object(db_query($query));
  }
  
  /**
--- includes/database.mysqli.inc
+++ includes/database.mysqli.inc
@@ -354,7 +354,14 @@
   *   TRUE if the table exists, and FALSE if the table does not exist.
   */
   function db_table_exists($table) {
-  return (bool) db_fetch_object(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'"));
+  $table = explode('.', db_prefix_tables("{".db_escape_table($table)."}"));
+  if (count($table) > 1) {
+    $query = "SHOW TABLES IN ".$table[0]." LIKE '".$table[1]."'";
+  } else {
+    $query = "SHOW TABLES LIKE '".$table[0]."'";
+  }
+  
+  return (bool) db_fetch_object(db_query($query));
  }
  
  /**
