diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-26 07:16:08 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-26 07:16:08 +0000 |
commit | b14a62210355e37382eee2f1c883623db77408a8 (patch) | |
tree | 73d6c86c0875e348cc10f98d69ab92fbcc58ae82 /includes/database.mysqli.inc | |
parent | cfaa4b5f76ff2f5dbb21c1b03c319659963b7cd9 (diff) | |
download | brdo-b14a62210355e37382eee2f1c883623db77408a8.tar.gz brdo-b14a62210355e37382eee2f1c883623db77408a8.tar.bz2 |
#74997 by dww, add db_table_exists()
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r-- | includes/database.mysqli.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index a84383357..f15f7cf01 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -367,6 +367,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". */ |