summaryrefslogtreecommitdiff
path: root/includes/database.mysql.inc
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-26 07:16:08 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-26 07:16:08 +0000
commitb14a62210355e37382eee2f1c883623db77408a8 (patch)
tree73d6c86c0875e348cc10f98d69ab92fbcc58ae82 /includes/database.mysql.inc
parentcfaa4b5f76ff2f5dbb21c1b03c319659963b7cd9 (diff)
downloadbrdo-b14a62210355e37382eee2f1c883623db77408a8.tar.gz
brdo-b14a62210355e37382eee2f1c883623db77408a8.tar.bz2
#74997 by dww, add db_table_exists()
Diffstat (limited to 'includes/database.mysql.inc')
-rw-r--r--includes/database.mysql.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index 0326bd508..731107be8 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -365,6 +365,13 @@ function db_unlock_tables() {
}
/**
+ * Check if a table exists.
+ */
+function db_table_exists($table) {
+ return db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
+}
+
+/**
* @} End of "ingroup database".
*/