function db_update in Drupal 7
Same name and namespace in other branches
- 8 core/includes/database.inc \db_update()
Returns a new UpdateQuery object for the active database.
Parameters
$table: The table to update.
$options: An array of options to control how the query operates.
Return value
UpdateQuery A new UpdateQuery object for this connection.
Related topics
9 calls to db_update()
- system_install in modules/
system/ system.install - Implements hook_install().
- system_update_7000 in modules/
system/ system.install - Rename blog and forum permissions to be consistent with other content types.
- system_update_7015 in modules/
system/ system.install - Change the user logout path.
- system_update_7021 in modules/
system/ system.install - Change the PHP for settings permission.
- system_update_7046 in modules/
system/ system.install - Switch from the Minnelli theme if it is the default or admin theme.
File
- includes/
database/ database.inc, line 2569 - Core systems for the database layer.
Code
function db_update($table, array $options = array()) {
if (empty($options['target']) || $options['target'] == 'slave') {
$options['target'] = 'default';
}
return Database::getConnection($options['target'])
->update($table, $options);
}