db_merge

includes/database/database.inc, line 1859

Versions
7
db_merge($table, array $options = array())

Returns a new MergeQuery object for the active database.

Parameters

$table The table into which to merge.

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

Return value

A new MergeQuery object for this connection.

Related topics

▾ 18 functions call db_merge()

actions_save in includes/actions.inc
Save an action and its associated user-supplied parameter values to the database.
aggregator_aggregator_parse in modules/aggregator/aggregator.parser.inc
Implement hook_aggregator_parse().
aggregator_remove in modules/aggregator/aggregator.module
Removes all items from a feed.
aggregator_save_category in modules/aggregator/aggregator.module
Add/edit/delete aggregator categories.
aggregator_save_feed in modules/aggregator/aggregator.module
Add/edit/delete an aggregator feed.
aggregator_save_item in modules/aggregator/aggregator.processor.inc
Add/edit/delete an aggregator item.
node_tag_new in modules/node/node.module
Update the 'last viewed' timestamp of the specified node for current user.
poll_update in modules/poll/poll.module
Implement hook_update().
profile_save_profile in modules/profile/profile.module
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_update_totals in modules/search/search.module
This function is called on shutdown to ensure that search_total is always up to date (even if cron times out or otherwise fails).
statistics_exit in modules/statistics/statistics.module
Implement hook_exit().
user_set_authmaps in modules/user/user.module
Save mappings of which external authentication module(s) authenticated a user. Maps external usernames to user ids in the users table.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_drupal_session_write in includes/session.inc
Session handler assigned by session_set_save_handler).
_registry_parse_file in includes/registry.inc
Parse a file and save its function and class listings.
_registry_parse_files in includes/registry.inc
Parse all files that have changed since the registry was last built, and save their function and class listings.
_update_cache_set in modules/update/update.module
Store data in the private update status cache table.

Code

<?php
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);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.