| Versionen | |
|---|---|
| drupal6 – drupal7 | db_add_unique_key(&$ret, $table, $name, $fields) |
Add a unique key.
$ret Array to which query results will be added.
$table The table to be altered.
$name The name of the key.
$fields An array of field names.
includes/
<?php
function db_add_unique_key(&$ret, $table, $name, $fields) {
$ret[] = update_sql('ALTER TABLE {' . $table . '} ADD UNIQUE KEY ' .
$name . ' (' . _db_create_key_sql($fields) . ')');
}
?>
Kommentare
Kommentar hinzufügen