| Versionen | |
|---|---|
| drupal7 | public DatabaseSchema_sqlite::createTableSql($name, $table) |
Generate SQL to create a new table from a Drupal schema definition.
$name The name of the table to create.
$table A Schema API table definition array.
An array of SQL statements to create the table.
includes/
<?php
public function createTableSql($name, $table) {
$sql = array();
$sql[] = "CREATE TABLE {" . $name . "} (\n" . $this->createColumsSql($name, $table) . "\n);\n";
return array_merge($sql, $this->createIndexSql($name, $table));
}
?>
Kommentare
Kommentar hinzufügen