db_add_unique_key

  1. drupal
    1. drupal6
    2. drupal6 database.pgsql.inc
    3. drupal7 database.inc
Versionen
drupal6 – drupal7 db_add_unique_key(&$ret, $table, $name, $fields)

Add a unique key.

Übergabeparameter

$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.

Verwandte Themen

Code

includes/database.mysql-common.inc, line 410

<?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

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen