8.5.x database.inc db_create_table($name, $table)
8.0.x database.inc db_create_table($name, $table)
8.1.x database.inc db_create_table($name, $table)
8.2.x database.inc db_create_table($name, $table)
8.3.x database.inc db_create_table($name, $table)
8.4.x database.inc db_create_table($name, $table)
8.6.x database.inc db_create_table($name, $table)
6.x database.inc db_create_table(&$ret, $name, $table)
7.x database.inc 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

13 calls to 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}.
openid_update_6000 in modules/openid/openid.install
Add the openid_nonce table.

... See full list

File

includes/database.inc, line 548
Wrapper for database interface code.

Code

function db_create_table(&$ret, $name, $table) {
  $statements = db_create_table_sql($name, $table);
  foreach ($statements as $statement) {
    $ret[] = update_sql($statement);
  }
}