values

  1. drupal
    1. drupal7
Versionen
drupal7 public InsertQuery::values(array $values)

Add another set of values to the query to be inserted.

If $values is a numeric array, it will be assumed to be in the same order as the original fields() call. If it is associative, it may be in any order as long as the keys of the array match the names of the fields.

Übergabeparameter

$values An array of values to add to the query.

Rückgabewert

The called object.

Verwandte Themen

Code

includes/database/query.inc, line 348

<?php
public function values(array $values) {
  if (is_numeric(key($values))) {
    $this->insertValues[] = $values;
  }
  else {
    // Reorder the submitted values to match the fields array.
    foreach ($this->insertFields as $key) {
      $insert_values[$key] = $values[$key];
    }
    // For consistency, the values array is always numerically indexed.
    $this->insertValues[] = array_values($insert_values);
  }
  return $this;
}
?>

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