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