1. drupal
    1. 8
    2. 7
8 – 7 db_update($table, array $options = array())

Returns a new UpdateQuery object for the active database.


$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

▾ 178 functions call db_update()

actions_loop_test_install in modules/simpletest/tests/actions_loop_test.install
Implements hook_install().
AggregatorCronTestCase::testCron in modules/aggregator/aggregator.test
Add feeds update them on cron.
aggregator_block_save in modules/aggregator/aggregator.module
Implements hook_block_save().
aggregator_cron in modules/aggregator/aggregator.module
Implements hook_cron().
aggregator_refresh in modules/aggregator/aggregator.module
Checks a news feed for new items.
aggregator_save_feed in modules/aggregator/aggregator.module
Add/edit/delete an aggregator feed.
BlockCacheTestCase::setCacheMode in modules/block/block.test
Private helper method to set the test block's cache mode.
block_admin_configure_submit in modules/block/block.admin.inc
Form submission handler for the block configuration form.
block_admin_display_form_submit in modules/block/block.admin.inc
Form submission handler for the main blocks administration form.
block_custom_block_save in modules/block/block.module
Saves a user-created block in the database.
block_install in modules/block/block.install
Implements hook_install().
block_update_7000 in modules/block/block.install
Set system.weight to a low value for block module.
block_update_7004 in modules/block/block.install
Add new blocks to new regions, migrate custom variables to blocks.
block_update_7005 in modules/block/block.install
Update the {block_custom}.format column.
book_update_bid in 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 modules/comment/comment.module
Publishes a comment.
comment_unpublish_action in modules/comment/comment.module
Unpublishes a comment.
comment_update_7001 in modules/comment/comment.install
Change comment status from published being 0 to being 1
comment_update_7006 in modules/comment/comment.install
Migrate data from the comment field to field storage.
ContactSitewideTestCase::testSiteWideContact in modules/contact/contact.test
Test configuration options and site-wide contact form.
contact_category_edit_form_submit in modules/contact/contact.admin.inc
Process the contact category edit page form submission.
contact_update_7001 in modules/contact/contact.install
Rename the administer contact forms permission.
CronRunTestCase::testTempFileCleanup in modules/system/system.test
Ensure that temporary files are removed.
dashboard_disable in modules/dashboard/dashboard.install
Implements hook_disable().
dashboard_enable in modules/dashboard/dashboard.install
Implements hook_enable().
DatabaseUpdateComplexTestCase::testBetweenConditionUpdate in modules/simpletest/tests/database_test.test
Test BETWEEN conditional clauses.
DatabaseUpdateComplexTestCase::testInConditionUpdate in modules/simpletest/tests/database_test.test
Test WHERE IN clauses.
DatabaseUpdateComplexTestCase::testLikeConditionUpdate in modules/simpletest/tests/database_test.test
Test LIKE conditionals.
DatabaseUpdateComplexTestCase::testNotInConditionUpdate in modules/simpletest/tests/database_test.test
Test WHERE NOT IN clauses.
DatabaseUpdateComplexTestCase::testOrConditionUpdate in modules/simpletest/tests/database_test.test
Test updates with OR conditionals.
DatabaseUpdateComplexTestCase::testUpdateExpression in modules/simpletest/tests/database_test.test
Test update with expression values.
DatabaseUpdateComplexTestCase::testUpdateOnlyExpression in modules/simpletest/tests/database_test.test
Test update with only expression values.
DatabaseUpdateLOBTestCase::testUpdateMultipleBlob in modules/simpletest/tests/database_test.test
Confirm that we can update two blob columns in the same table.
DatabaseUpdateLOBTestCase::testUpdateOneBlob in modules/simpletest/tests/database_test.test
Confirm that we can update a blob column.
DatabaseUpdateTestCase::testExpressionUpdate in modules/simpletest/tests/database_test.test
Test updating with expressions.
DatabaseUpdateTestCase::testMultiGTUpdate in modules/simpletest/tests/database_test.test
Confirm that we can update a multiple records with a non-equality condition.
DatabaseUpdateTestCase::testMultiUpdate in modules/simpletest/tests/database_test.test
Confirm that we can update a multiple records successfully.
DatabaseUpdateTestCase::testSimpleNullUpdate in modules/simpletest/tests/database_test.test
Confirm updating to NULL.
DatabaseUpdateTestCase::testSimpleUpdate in modules/simpletest/tests/database_test.test
Confirm that we can update a single record successfully.
DatabaseUpdateTestCase::testWhereAndConditionUpdate in modules/simpletest/tests/database_test.test
Confirm that we can stack condition and where calls.
DatabaseUpdateTestCase::testWhereUpdate in modules/simpletest/tests/database_test.test
Confirm that we can update a multiple records with a where call.
dbtng_example_entry_update in examples/dbtng_example/dbtng_example.module
Update an entry in the database.
DrupalWebTestCase::drupalCreateNode in modules/simpletest/drupal_web_test_case.php
Creates a node based on default settings.
DrupalWebTestCase::setUp in 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 includes/session.inc
Called when an anonymous user becomes authenticated or vice-versa.
drupal_set_installed_schema_version in includes/install.inc
Update the installed version information for a module.
drupal_write_record in includes/common.inc
Saves (inserts or updates) a record to the database based upon the schema.
EntityFieldQueryTestCase::setUp in modules/simpletest/tests/entity_query.test
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.…
FieldInfoTestCase::testFieldPrepare in modules/field/tests/field.test
Test that cached field definitions are ready for current runtime context.
FieldInfoTestCase::testInstancePrepare in modules/field/tests/field.test
Test that cached instance definitions are ready for current runtime context.
field_associate_fields in modules/field/field.module
Allows a module to update the database for fields and columns it controls.
field_attach_rename_bundle in modules/field/field.attach.inc
Notify field.module that a bundle was renamed.
field_delete_field in modules/field/field.crud.inc
Marks a field and its instances and data for deletion.
field_delete_instance in modules/field/field.crud.inc
Marks a field instance and its data for deletion.
field_sql_storage_field_attach_rename_bundle in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_attach_rename_bundle().
field_sql_storage_field_storage_delete_field in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_delete_field().
field_sql_storage_field_storage_delete_instance in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_delete_instance().
field_sql_storage_update_7001 in modules/field/modules/field_sql_storage/field_sql_storage.install
Remove the field_config_entity_type table and store 'entity_type' strings.
field_sync_field_status in modules/field/field.module
Refreshes the 'active' and 'storage_active' columns for fields.
field_test_entity_save in modules/field/tests/field_test.entity.inc
Saves a test_entity.
field_test_install in modules/field/tests/field_test.install
Implements hook_install().
field_update_7001 in modules/field/field.install
Fix fields definitions created during the d6 to d7 upgrade path.
file_usage_delete in includes/file.inc
Removes a record to indicate that a module is no longer using a file.
filter_admin_overview_submit in modules/filter/filter.admin.inc
filter_format_disable in modules/filter/filter.module
Disable a text format.
filter_update_7005 in modules/filter/filter.install
Integrate text formats with the user permissions system.
forum_install in modules/forum/forum.install
Implements hook_install().
forum_node_update in modules/forum/forum.module
Implements hook_node_update().
forum_update_7003 in modules/forum/forum.install
Rename field to 'taxonomy_forums'.
hook_entity_update in modules/system/system.api.php
Act on entities when updated.
hook_exit in modules/system/system.api.php
Perform cleanup tasks.
hook_field_storage_delete_field in modules/field/field.api.php
Act on deletion of a field.
hook_field_storage_delete_instance in modules/field/field.api.php
Act on deletion of a field instance.
hook_menu_link_update in modules/system/system.api.php
Inform modules that a menu link has been updated.
hook_node_update in modules/node/node.api.php
Respond to updates to a node.
hook_path_update in modules/path/path.api.php
Allow modules to respond to a path being updated.
hook_search_reset in modules/search/search.api.php
Take action when the search index is going to be rebuilt.
hook_update in modules/node/node.api.php
Respond to updates to a node.
hook_update_N in modules/system/system.api.php
Perform a single update.
hook_user_cancel in modules/user/user.api.php
Act on user account cancellations.
install_finished in includes/install.core.inc
Installation task; perform final steps and display a 'finished' page.
list_update_7001 in modules/field/modules/list/list.install
Rename the list field types and change 'allowed_values' format.
locale in modules/locale/locale.module
Provides interface translation services.
LocaleUpgradePathTestCase::testLocaleUpgradePathFallback in modules/simpletest/tests/upgrade/upgrade.locale.test
Test an upgrade with path-based (with fallback) negotiation.
locale_languages_delete_form_submit in modules/locale/locale.admin.inc
Process language deletion submissions.
locale_languages_edit_form_submit in modules/locale/locale.admin.inc
Process the language editing form submission.
locale_languages_overview_form_submit in modules/locale/locale.admin.inc
Process language overview form submissions, updating existing languages.
locale_translate_edit_form_submit in modules/locale/locale.admin.inc
Process string editing form submissions.
locale_update_7001 in modules/locale/locale.install
Upgrade language negotiation settings.
lock_acquire in includes/lock.inc
Acquire (or renew) a lock, but do not block if it fails.
MenuBreadcrumbTestCase::setUp in modules/simpletest/tests/menu.test
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.…
MenuRouterTestCase::testMenuLinkMaintain in modules/simpletest/tests/menu.test
Tests for menu_link_maintain().
MenuTrailTestCase::setUp in modules/simpletest/tests/menu.test
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.…
menu_link_save in includes/menu.inc
Saves a menu link.
menu_update_7001 in modules/menu/menu.install
Rename "Primary Links" and "Secondary Links" to their Drupal 7 equivalents.
ModuleUnitTest::testModuleList in modules/simpletest/tests/module.test
The basic functionality of module_list().
module_disable in includes/module.inc
Disable a given set of modules.
module_enable in includes/module.inc
Enables or installs a given list of modules.
NodeAccessExampleTestCase::testNodeAccessBasic in examples/node_access_example/node_access_example.test
Test the "private" node access.
nodeapi_example_node_update in examples/nodeapi_example/nodeapi_example.module
Implements hook_node_update().
NodeBlockFunctionalTest::testRecentNodeBlock in modules/node/node.test
Test the recent comments block.
node_access_example_node_update in examples/node_access_example/node_access_example.module
Implements hook_node_update().
node_save in modules/node/node.module
Save changes to a node or add a new node.
node_search_reset in modules/node/node.module
Implements hook_search_reset().
node_type_save in modules/node/node.module
Saves a node type to the database.
node_type_update_nodes in modules/node/node.module
Updates all nodes of one type to be of another type.
node_update_7000 in modules/node/node.install
Upgrade the node type table and fix node type 'module' attribute to avoid name-space conflicts.
node_update_7006 in 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 modules/node/node.install
Convert node languages from the empty string to LANGUAGE_NONE.
node_update_7012 in modules/node/node.install
Switches body fields to untranslatable while upgrading from D6 and makes them language neutral.
node_user_cancel in modules/node/node.module
Implements hook_user_cancel().
PollExpirationTestCase::testAutoExpire in modules/poll/poll.test
PollVoteCheckHostname::testHostnamePollVote in modules/poll/poll.test
Check that anonymous users with same ip cannot vote on poll more than once unless user is logged in.
poll_cancel in modules/poll/poll.module
Submit callback for poll_cancel_form().
poll_cron in modules/poll/poll.module
Implements hook_cron().
poll_update in modules/poll/poll.module
Implements hook_update().
poll_update_7001 in 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 modules/poll/poll.module
Implements hook_user_cancel().
poll_vote in modules/poll/poll.module
Submit handler for processing a vote.
profile_admin_overview_submit in modules/profile/profile.admin.inc
Submit handler to update changed profile field weights and categories.
profile_field_form_submit in modules/profile/profile.admin.inc
Process profile_field_form submissions.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_touch_node in modules/search/search.module
Changes a node's changed timestamp to 'now' to force reindexing.
standard_install in profiles/standard/standard.install
Implements hook_install().
statistics_cron in modules/statistics/statistics.module
Implements hook_cron().
statistics_user_cancel in modules/statistics/statistics.module
Implements hook_user_cancel().
SystemQueue::claimItem in modules/system/system.queue.inc
SystemQueue::releaseItem in modules/system/system.queue.inc
system_cron in modules/system/system.module
Implements hook_cron().
system_install in modules/system/system.install
Implements hook_install().
system_status in modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
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.
system_update_7048 in modules/system/system.install
Convert path languages from the empty string to LANGUAGE_NONE.
system_update_7053 in modules/system/system.install
Upgrade standard blocks and menus.
system_update_files_database in modules/system/system.module
Updates the records in the system table based on the files array.
taxonomy_overview_terms_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler for terms overview form.
taxonomy_update_7002 in modules/taxonomy/taxonomy.install
Add {vocabulary}.machine_name column.
taxonomy_vocabulary_confirm_reset_alphabetical_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler to reset a vocabulary to alphabetical order after confirmation.
theme_disable in includes/theme.inc
Disable a given list of themes.
theme_enable in includes/theme.inc
Enable a given list of themes.
TokenExampleTestCase::testInterface in examples/token_example/token_example.test
translation_node_insert in modules/translation/translation.module
Implements hook_node_insert().
translation_node_update in modules/translation/translation.module
Implements hook_node_update().
translation_remove_from_set in modules/translation/translation.module
Remove a node from its translation set (if any) and update the set accordingly.
trigger_update_7000 in modules/trigger/trigger.install
Adds operation names to the hook names and drops the "op" field.
UpdateFeedItemTestCase::testUpdateFeedItem in modules/aggregator/aggregator.test
Test running "update items" from the 'admin/config/services/aggregator' page.
UpdateTestContribCase::testUpdateBaseThemeSecurityUpdate in modules/update/update.test
Test that subthemes are notified about security updates for base themes.
UpdateTestContribCase::testUpdateShowDisabledThemes in modules/update/update.test
Test that disabled themes are only shown when desired.
update_fix_compatibility in includes/update.inc
Disable any items in the {system} table that are not core compatible.
update_fix_d7_block_deltas in 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.
UpgradePathTestCase::setUp in modules/simpletest/tests/upgrade/upgrade.test
Override of DrupalWebTestCase::setUp() specialized for upgrade testing.
url_alter_test_install in modules/simpletest/tests/url_alter_test.install
Impelement hook_install().
UserCancelTestCase::testUserCancelUid1 in modules/user/user.test
Tests that user account for uid 1 cannot be cancelled.
user_file_delete in modules/user/user.module
Implements hook_file_delete().
user_file_move in modules/user/user.module
Implements hook_file_move().
user_install in modules/user/user.install
Implements hook_install().
user_login_finalize in modules/user/user.module
Finalize the login process. Must be called when logging in a user.
user_update_7000 in modules/user/user.install
Increase the length of the password field to accommodate better hashes.
user_update_7002 in modules/user/user.install
Convert user time zones from time zone offsets to time zone names.
user_update_7010 in modules/user/user.install
Update the {user}.signature_format column.
user_update_7012 in modules/user/user.install
Add the user's pictures to the {file_managed} table and make them managed files.
user_update_7014 in modules/user/user.install
Rename the 'post comments without approval' permission.
_batch_shutdown in includes/batch.inc
Shutdown function; store the current batch data for the next request.
_comment_update_node_statistics in 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 includes/session.inc
Writes an entire session to the database (internal use only).
_forum_update_forum_index in modules/forum/forum.module
Updates the taxonomy index for a given node.
_locale_import_one_string in includes/locale.inc
Imports a string into the database
_locale_import_one_string_db in includes/locale.inc
Import one string into the database.
_locale_parse_js_file in 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 includes/locale.inc
(Re-)Creates the JavaScript translation file for a language.
_menu_link_move_children in includes/menu.inc
Update the children of a menu link that's being moved.
_menu_navigation_links_rebuild in includes/menu.inc
Helper function to build menu links for the items in the menu router.
_menu_update_parental_status in includes/menu.inc
Check and update the has_children status for the parent of a link.
_system_update_bootstrap_status in modules/system/system.module
Refresh bootstrap column in the system table.
_tracker_remove in modules/tracker/tracker.module
Clean up indexed data when nodes or comments are removed.


includes/database/database.inc, line 2428

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);