db_update

  1. drupal
    1. 7
Versions
7 db_update($table, array $options = array())

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

▾ 139 functions call db_update()

actions_loop_test_install in drupal/modules/simpletest/tests/actions_loop_test.install
Implements hook_install().
aggregator_block_save in drupal/modules/aggregator/aggregator.module
Implements hook_block_save().
aggregator_cron in drupal/modules/aggregator/aggregator.module
Implements hook_cron().
aggregator_refresh in drupal/modules/aggregator/aggregator.module
Checks a news feed for new items.
aggregator_save_feed in drupal/modules/aggregator/aggregator.module
Add/edit/delete an aggregator feed.
block_admin_configure_submit in drupal/modules/block/block.admin.inc
Form submission handler for the block configuration form.
block_admin_display_form_submit in drupal/modules/block/block.admin.inc
Form submission handler for the main blocks administration form.
block_custom_block_save in drupal/modules/block/block.module
Saves a user-created block in the database.
block_install in drupal/modules/block/block.install
Implements hook_install().
block_update_7000 in drupal/modules/block/block.install
Set system.weight to a low value for block module.
block_update_7004 in drupal/modules/block/block.install
Add new blocks to new regions, migrate custom variables to blocks.
block_update_7005 in drupal/modules/block/block.install
Update the {block_custom}.format column.
book_update_bid in drupal/modules/book/book.module
Update the bid for a page and its children when it is moved to a new book.
comment_publish_action in drupal/modules/comment/comment.module
Publishes a comment.
comment_save in drupal/modules/comment/comment.module
Accepts a submission of new or changed comment content.
comment_unpublish_action in drupal/modules/comment/comment.module
Unpublishes a comment.
comment_update_7001 in drupal/modules/comment/comment.install
Change comment status from published being 0 to being 1
comment_update_7006 in drupal/modules/comment/comment.install
Migrate data from the comment field to field storage.
contact_category_edit_form_submit in drupal/modules/contact/contact.admin.inc
Process the contact category edit page form submission.
contact_update_7001 in drupal/modules/contact/contact.install
Rename the administer contact forms permission.
dashboard_disable in drupal/modules/dashboard/dashboard.install
Implements hook_disable().
dashboard_enable in drupal/modules/dashboard/dashboard.install
Implements hook_enable().
dbtng_example_entry_update in examples/dbtng_example/dbtng_example.module
Update an entry in the database.
DrupalWebTestCase::drupalCreateNode in drupal/modules/simpletest/drupal_web_test_case.php
Creates a node based on default settings.
DrupalWebTestCase::setUp in drupal/modules/simpletest/drupal_web_test_case.php
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
drupal_session_regenerate in drupal/includes/session.inc
Called when an anonymous user becomes authenticated or vice-versa.
drupal_set_installed_schema_version in drupal/includes/install.inc
Update the installed version information for a module.
drupal_write_record in drupal/includes/common.inc
Saves (inserts or updates) a record to the database based upon the schema.
field_associate_fields in drupal/modules/field/field.module
Allows a module to update the database for fields and columns it controls.
field_attach_rename_bundle in drupal/modules/field/field.attach.inc
Notify field.module that a bundle was renamed.
field_delete_field in drupal/modules/field/field.crud.inc
Marks a field and its instances and data for deletion.
field_delete_instance in drupal/modules/field/field.crud.inc
Marks a field instance and its data for deletion.
field_modules_disabled in drupal/modules/field/field.module
Implements hook_modules_disabled().
field_sql_storage_field_attach_rename_bundle in drupal/modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_attach_rename_bundle().
field_sql_storage_field_storage_delete_field in drupal/modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_delete_field().
field_sql_storage_field_storage_delete_instance in drupal/modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_delete_instance().
field_sql_storage_update_7001 in drupal/modules/field/modules/field_sql_storage/field_sql_storage.install
Remove the field_config_entity_type table and store 'entity_type' strings.
field_test_entity_save in drupal/modules/field/tests/field_test.entity.inc
Saves a test_entity.
field_test_install in drupal/modules/field/tests/field_test.install
Implements hook_install().
field_update_7001 in drupal/modules/field/field.install
Fix fields definitions created during the d6 to d7 upgrade path.
file_usage_delete in drupal/includes/file.inc
Removes a record to indicate that a module is no longer using a file.
filter_admin_overview_submit in drupal/modules/filter/filter.admin.inc
filter_format_disable in drupal/modules/filter/filter.module
Disable a text format.
filter_update_7005 in drupal/modules/filter/filter.install
Integrate text formats with the user permissions system.
forum_install in drupal/modules/forum/forum.install
Implements hook_install().
forum_node_update in drupal/modules/forum/forum.module
Implements hook_node_update().
hook_entity_update in drupal/modules/system/system.api.php
Act on entities when updated.
hook_exit in drupal/modules/system/system.api.php
Perform cleanup tasks.
hook_field_storage_delete_field in drupal/modules/field/field.api.php
Act on deletion of a field.
hook_field_storage_delete_instance in drupal/modules/field/field.api.php
Act on deletion of a field instance.
hook_menu_link_update in drupal/modules/system/system.api.php
Inform modules that a menu link has been updated.
hook_node_update in drupal/modules/node/node.api.php
Respond to updates to a node.
hook_path_update in drupal/modules/path/path.api.php
Allow modules to respond to a path being updated.
hook_search_reset in drupal/modules/search/search.api.php
Take action when the search index is going to be rebuilt.
hook_update in drupal/modules/node/node.api.php
Respond to updates to a node.
hook_update_N in drupal/modules/system/system.api.php
Perform a single update.
hook_user_cancel in drupal/modules/user/user.api.php
Act on user account cancellations.
install_finished in drupal/includes/install.core.inc
Installation task; perform final steps and display a 'finished' page.
list_update_7001 in drupal/modules/field/modules/list/list.install
Rename the list field types and change 'allowed_values' format.
locale in drupal/modules/locale/locale.module
Provides interface translation services.
locale_languages_delete_form_submit in drupal/modules/locale/locale.admin.inc
Process language deletion submissions.
locale_languages_edit_form_submit in drupal/modules/locale/locale.admin.inc
Process the language editing form submission.
locale_languages_overview_form_submit in drupal/modules/locale/locale.admin.inc
Process language overview form submissions, updating existing languages.
locale_translate_edit_form_submit in drupal/modules/locale/locale.admin.inc
Process string editing form submissions.
locale_update_7001 in drupal/modules/locale/locale.install
Upgrade language negotiation settings.
lock_acquire in drupal/includes/lock.inc
Acquire (or renew) a lock, but do not block if it fails.
menu_link_save in drupal/includes/menu.inc
Save a menu link.
module_disable in drupal/includes/module.inc
Disable a given set of modules.
module_enable in drupal/includes/module.inc
Enables or installs a given list of modules.
nodeapi_example_node_update in examples/nodeapi_example/nodeapi_example.module
Implements hook_node_update().
node_access_example_node_update in examples/node_access_example/node_access_example.module
Implements hook_nodeapi_update().
node_save in drupal/modules/node/node.module
Save changes to a node or add a new node.
node_search_reset in drupal/modules/node/node.module
Implements hook_search_reset().
node_type_save in drupal/modules/node/node.module
Saves a node type to the database.
node_type_update_nodes in drupal/modules/node/node.module
Updates all nodes of one type to be of another type.
node_update_7000 in drupal/modules/node/node.install
Upgrade the node type table and fix node type 'module' attribute to avoid name-space conflicts.
node_update_7006 in drupal/modules/node/node.install
Convert body and teaser from node properties to fields, and migrate status/comment/promote and sticky columns to the {node_revision} table.
node_update_7009 in drupal/modules/node/node.install
Convert node languages from the empty string to LANGUAGE_NONE.
node_user_cancel in drupal/modules/node/node.module
Implements hook_user_cancel().
poll_cancel in drupal/modules/poll/poll.module
Submit callback for poll_cancel_form().
poll_cron in drupal/modules/poll/poll.module
Implements hook_cron().
poll_update in drupal/modules/poll/poll.module
Implements hook_update().
poll_update_7001 in drupal/modules/poll/poll.install
Use the poll_choice primary key to record votes in poll_votes rather than the choice order. Rename chorder to weight.
poll_user_cancel in drupal/modules/poll/poll.module
Implements hook_user_cancel().
poll_vote in drupal/modules/poll/poll.module
Submit handler for processing a vote.
profile_admin_overview_submit in drupal/modules/profile/profile.admin.inc
Submit handler to update changed profile field weights and categories.
profile_field_form_submit in drupal/modules/profile/profile.admin.inc
Process profile_field_form submissions.
search_index in drupal/modules/search/search.module
Update the full-text search index for a particular item.
search_touch_node in drupal/modules/search/search.module
Changes a node's changed timestamp to 'now' to force reindexing.
standard_install in drupal/profiles/standard/standard.install
Implements hook_install().
statistics_cron in drupal/modules/statistics/statistics.module
Implements hook_cron().
statistics_user_cancel in drupal/modules/statistics/statistics.module
Implements hook_user_cancel().
SystemQueue::claimItem in drupal/modules/system/system.queue.inc
SystemQueue::releaseItem in drupal/modules/system/system.queue.inc
system_cron in drupal/modules/system/system.module
Implements hook_cron().
system_install in drupal/modules/system/system.install
Implements hook_install().
system_status in drupal/modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
system_update_7000 in drupal/modules/system/system.install
Rename blog and forum permissions to be consistent with other content types.
system_update_7015 in drupal/modules/system/system.install
Change the user logout path.
system_update_7021 in drupal/modules/system/system.install
Change the PHP for settings permission.
system_update_7046 in drupal/modules/system/system.install
Switch from the Minnelli theme if it is the default or admin theme.
system_update_7048 in drupal/modules/system/system.install
Convert path languages from the empty string to LANGUAGE_NONE.
system_update_7053 in drupal/modules/system/system.install
Upgrade standard blocks and menus.
system_update_files_database in drupal/modules/system/system.module
Updates the records in the system table based on the files array.
taxonomy_overview_terms_submit in drupal/modules/taxonomy/taxonomy.admin.inc
Submit handler for terms overview form.
taxonomy_update_7002 in drupal/modules/taxonomy/taxonomy.install
Add {vocabulary}.machine_name column.
taxonomy_vocabulary_confirm_reset_alphabetical_submit in drupal/modules/taxonomy/taxonomy.admin.inc
Submit handler to reset a vocabulary to alphabetical order after confirmation.
theme_disable in drupal/includes/theme.inc
Disable a given list of themes.
theme_enable in drupal/includes/theme.inc
Enable a given list of themes.
translation_node_insert in drupal/modules/translation/translation.module
Implements hook_node_insert().
translation_node_update in drupal/modules/translation/translation.module
Implements hook_node_update().
translation_remove_from_set in drupal/modules/translation/translation.module
Remove a node from its translation set (if any) and update the set accordingly.
trigger_update_7000 in drupal/modules/trigger/trigger.install
Adds operation names to the hook names and drops the "op" field.
update_fix_compatibility in drupal/includes/update.inc
Disable any items in the {system} table that are not core compatible.
update_fix_d7_block_deltas in drupal/includes/update.inc
A helper function that modules can use to assist with the transformation from numeric block deltas to string block deltas during the 6.x -> 7.x upgrade.
url_alter_test_install in drupal/modules/simpletest/tests/url_alter_test.install
Impelement hook_install().
user_file_delete in drupal/modules/user/user.module
Implements hook_file_delete().
user_file_move in drupal/modules/user/user.module
Implements hook_file_move().
user_install in drupal/modules/user/user.install
Implements hook_install().
user_login_finalize in drupal/modules/user/user.module
Finalize the login process. Must be called when logging in a user.
user_update_7000 in drupal/modules/user/user.install
Increase the length of the password field to accommodate better hashes.
user_update_7002 in drupal/modules/user/user.install
Convert user time zones from time zone offsets to time zone names.
user_update_7006 in drupal/modules/user/user.install
Add module data to {role_permission}.
user_update_7010 in drupal/modules/user/user.install
Update the {user}.signature_format column.
user_update_7012 in drupal/modules/user/user.install
Add the user's pictures to the {file_managed} table and make them managed files.
user_update_7014 in drupal/modules/user/user.install
Rename the 'post comments without approval' permission.
_batch_shutdown in drupal/includes/batch.inc
Shutdown function; store the current batch data for the next request.
_comment_update_node_statistics in drupal/modules/comment/comment.module
Updates the comment statistics for a given node. This should be called any time a comment is added, deleted, or updated.
_drupal_session_write in drupal/includes/session.inc
Session handler assigned by session_set_save_handler().
_forum_update_forum_index in drupal/modules/forum/forum.module
Updates the taxonomy index for a given node.
_locale_import_one_string in drupal/includes/locale.inc
Imports a string into the database
_locale_import_one_string_db in drupal/includes/locale.inc
Import one string into the database.
_locale_parse_js_file in drupal/includes/locale.inc
Parses a JavaScript file, extracts strings wrapped in Drupal.t() and Drupal.formatPlural() and inserts them into the database.
_locale_rebuild_js in drupal/includes/locale.inc
(Re-)Creates the JavaScript translation file for a language.
_menu_link_move_children in drupal/includes/menu.inc
Update the children of a menu link that's being moved.
_menu_navigation_links_rebuild in drupal/includes/menu.inc
Helper function to build menu links for the items in the menu router.
_menu_update_parental_status in drupal/includes/menu.inc
Check and update the has_children status for the parent of a link.
_system_update_bootstrap_status in drupal/modules/system/system.module
Refresh bootstrap column in the system table.
_tracker_remove in drupal/modules/tracker/tracker.module
Clean up indexed data when nodes or comments are removed.

Code

drupal/includes/database/database.inc, line 2330

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