execute

  1. drupal
    1. drupal7
Versionen
drupal7 public UpdateQuery::execute()

Verwandte Themen

Code

includes/database/query.inc, line 997

<?php
public function execute() {

  // Expressions take priority over literal fields, so we process those first
  // and remove any literal fields that conflict.
  $fields = $this->fields;
  $update_values = array();
  foreach ($this->expressionFields as $field => $data) {
    if (!empty($data['arguments'])) {
      $update_values += $data['arguments'];
    }
    unset($fields[$field]);
  }

  // Because we filter $fields the same way here and in __toString(), the
  // placeholders will all match up properly.
  $max_placeholder = 0;
  foreach ($fields as $field => $value) {
    $update_values[':db_update_placeholder_' . ($max_placeholder++)] = $value;
  }

  if (count($this->condition)) {
    $this->condition->compile($this->connection);
    $update_values = array_merge($update_values, $this->condition->arguments());
  }

  return $this->connection->query((string) $this, $update_values, $this->queryOptions);
}
?>

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