| Versionen | |
|---|---|
| drupal7 | public MergeQuery::updateExcept($exclude_fields) |
Specify fields that should not be updated in case of a duplicate record.
If this method is called and a record with the values in keys() already exists, Drupal will instead update the record with the values passed in the fields() method except for the fields specified in this method. That is, calling this method is equivalent to calling update() with identical parameters as fields() minus the keys specified here.
The update() method takes precedent over this method. If update() is called, this method has no effect.
$exclude_fields An array of fields in the query that should not be updated to match those specified by the fields() method. Alternatively, the fields may be specified as a variable number of string parameters.
The called object.
includes/
<?php
public function updateExcept($exclude_fields) {
if (!is_array($exclude_fields)) {
$exclude_fields = func_get_args();
}
$this->excludeFields = $exclude_fields;
return $this;
}
?>
Kommentare
Kommentar hinzufügen