function db_merge

7.x db_merge($table, array $options = array())

Returns a new MergeQuery object for the active database.


$table: The table into which to merge.

$options: An array of options to control how the query operates.

Return value

MergeQuery A new MergeQuery object for this connection.

Related topics

43 calls to db_merge()
actions_save in drupal/includes/
Saves an action and its user-supplied parameter values to the database.
aggregator_refresh in drupal/modules/aggregator/aggregator.module
Checks a news feed for new items.
aggregator_save_category in drupal/modules/aggregator/aggregator.module
Adds/edits/deletes aggregator categories.
aggregator_save_item in drupal/modules/aggregator/
Adds/edits/deletes an aggregator item.
BlockInvalidRegionTestCase::testBlockInInvalidRegion in drupal/modules/block/block.test
Tests that blocks assigned to invalid regions work correctly.

... See full list


drupal/includes/database/, line 2441
Core systems for the database layer.


function db_merge($table, array $options = array()) {
  if (empty($options['target']) || $options['target'] == 'slave') {
    $options['target'] = 'default';
  return Database::getConnection($options['target'])->merge($table, $options);