db_update($table, Array $options = array())
drupal/includes/database/database.inc, line 1658
Returns a new UpdateQuery object for the active database.
$table The table to update.
$options An array of options to control how the query operates.
A new UpdateQuery object for this connection.
| Name | Description |
|---|---|
| Database abstraction layer | Allow the use of different database servers using the same code base. |
function db_update($table, Array $options = array()) {
if (empty($options['target']) || $options['target'] == 'slave') {
$options['target'] = 'default';
}
return Database::getActiveConnection($options['target'])->update($table, $options);
}