Same name and namespace in other branches
- 8.9.x 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
101 calls to db_update()
- AggregatorCronTestCase::testCron in modules/
aggregator/ aggregator.test - Adds feeds and updates them via cron process.
- BlockCacheTestCase::setCacheMode in modules/
block/ block.test - Private helper method to set the test block's cache mode.
- book_update_bid in modules/
book/ book.module - Updates the book ID of a page and its children when it moves to a new book.
- BootstrapGetFilenameWebTestCase::testDrupalGetFilename in modules/
simpletest/ tests/ bootstrap.test - Test that drupal_get_filename() works correctly with a full Drupal site.
- comment_publish_action in modules/
comment/ comment.module - Publishes a comment.
File
- includes/
database/ database.inc, line 2579 - 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);
}