expression

  1. drupal
    1. drupal7
Versionen
drupal7 public MergeQuery::expression($field, $expression, array $arguments = NULL)

Specify fields to be updated as an expression.

Expression fields are cases such as counter=counter+1. This method only applies if a duplicate key is detected. This method takes precedent over both update() and updateExcept().

Übergabeparameter

$field The field to set.

$expression The field will be set to the value of this expression. This parameter may include named placeholders.

$arguments If specified, this is an array of key/value pairs for named placeholders corresponding to the expression.

Rückgabewert

The called object.

Verwandte Themen

Code

includes/database/query.inc, line 669

<?php
public function expression($field, $expression, array $arguments = NULL) {
  $this->expressionFields[$field] = array(
      'expression' => $expression,
      'arguments' => $arguments,
    );

  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