db_create_table

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

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

Версии
6
db_create_table(&$ret, $name, $table)

Создает новую таблицу из описания таблицы в нотации Друпала.

Параметры

$ret Массив, в который будет добавлен результат запроса.

$name Имя создаваемой таблицы.

$table Определение этой таблицы в Схеме БД.

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

▾ 10 функции вызывают db_create_table()

blogapi_update_6001 in modules/blogapi/blogapi.install
Add blogapi_files table to enable size restriction for BlogAPI file uploads.
book_update_6000 in modules/book/book.install
Drupal 5.x to 6.x update.
drupal_install_schema in includes/common.inc
Создаёт все таблицы БД, определённые в реализации hook_schema() модуля.
locale_update_6000 in modules/locale/locale.install
{locales_meta} table became {languages}.
system_update_6020 in modules/system/system.install
Create the tables for the new menu system.
system_update_6021 in modules/system/system.install
Migrate the menu items from the old menu system to the new menu_links table.
system_update_6030 in modules/system/system.install
Add the tables required by actions.inc.
system_update_6036 in modules/system/system.install
Change the search schema and indexing.
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.

Код

<?php
function db_create_table(&$ret, $name, $table) {
  $statements = db_create_table_sql($name, $table);
  foreach ($statements as $statement) {
    $ret[] = update_sql($statement);
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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