db_create_table

Versions
6
db_create_table(&$ret, $name, $table)
7
db_create_table($name, $table)

Create a new table from a Drupal table definition.

Parameters

$ret Array to which query results will be added.

$name The name of the table to create.

$table A Schema API table definition array.

Related topics

▾ 10 functions call 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
Create all tables that a module defines in its 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.

Code

includes/database.inc, line 525

<?php
function db_create_table(&$ret, $name, $table) {
  $statements = db_create_table_sql($name, $table);
  foreach ($statements as $statement) {
    $ret[] = update_sql($statement);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.