| Versionen | |
|---|---|
| drupal7 | public MergeQuery::update(array $fields, array $values = array()) |
Specify fields to update in case of a duplicate record.
If a record with the values in keys() already exists, the fields and values specified here will be updated in that record. If this method is not called, it defaults to the same values as were passed to the fields() method.
$fields An array of fields to set.
$values An array of fields to set into the database. The values must be specified in the same order as the $fields array.
The called object.
includes/
<?php
public function update(array $fields, array $values = array()) {
if ($values) {
$fields = array_combine($fields, $values);
}
$this->updateFields = $fields;
return $this;
}
?>
Kommentare
Kommentar hinzufügen