You are here

function db_create_table in Drupal 6

Same name and namespace in other branches
  1. 8 core/includes/database.inc \db_create_table()
  2. 7 includes/database/database.inc \db_create_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);
  }
}