db_table_exists

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/database.mysql.inc, строка 340

Версии
5 – 6
db_table_exists($table)

Проверяет, существует ли таблица.

Связанные темы

▾ 15 функции вызывают db_table_exists()

blogapi_update_6001 in modules/blogapi/blogapi.install
Add blogapi_files table to enable size restriction for BlogAPI file uploads.
system_update_6019 in modules/system/system.install
Reconcile small differences in the previous, manually created mysql and pgsql schemas so they are the same and can be represented by a single schema structure.
system_update_6030 in modules/system/system.install
Add the tables required by actions.inc.
system_update_6032 in modules/system/system.install
profile_fields.name used to be nullable but is part of a unique key and so shouldn't be.
system_update_6033 in modules/system/system.install
Change node_comment_statistics to be not autoincrement.
system_update_6036 in modules/system/system.install
Change the search schema and indexing.
system_update_6038 in modules/system/system.install
Ensure that 'Account' is not used as a Profile category.
system_update_6040 in modules/system/system.install
Add a weight column to the upload table.
system_update_6041 in modules/system/system.install
Change forum vocabulary not to be required by default and set the weight of the forum.module 1 higher than the taxonomy.module.
system_update_6043 in modules/system/system.install
Update table indices to make them more rational and useful.
system_update_6044 in modules/system/system.install
RC1 to RC2 index cleanup.
update_create_batch_table in ./update.php
Create the batch table.
update_fix_d6_requirements in ./update.php
Perform Drupal 5.x to 6.x updates that are required for update.php to function properly.
update_info_page in ./update.php
upload_install in modules/upload/upload.install
Реализация hook_install().

Код

<?php
function db_table_exists($table) {
  return (bool) db_fetch_object(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'"));
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему