db_delete

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

Returns a new DeleteQuery object for the active database.

Parameters

$table The table from which to delete.

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

Return value

A new DeleteQuery object for this connection.

Related topics

▾ 123 functions call db_delete()

actions_delete in includes/actions.inc
Deletes a single action from the database.
aggregator_aggregator_remove in modules/aggregator/aggregator.processor.inc
Implement hook_aggregator_remove().
aggregator_categorize_items_submit in modules/aggregator/aggregator.pages.inc
Process aggregator_categorize_items() form submissions.
aggregator_expire in modules/aggregator/aggregator.processor.inc
Expire feed items on $feed that are older than aggregator_clear.
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.
block_admin_configure_submit in modules/block/block.admin.inc
block_custom_block_delete_submit in modules/block/block.admin.inc
Deletion of custom blocks.
block_menu_delete in modules/block/block.module
Implement hook_menu_delete().
block_user_role_delete in modules/block/block.module
Implement hook_user_role_delete().
book_node_delete in modules/book/book.module
Implement hook_node_delete().
book_remove_form_submit in modules/book/book.pages.inc
Confirm form submit function to remove a node from the book.
comment_delete_multiple in modules/comment/comment.module
Delete comments and all their replies.
comment_node_delete in modules/comment/comment.module
Implement hook_node_delete().
contact_category_delete_form_submit in modules/contact/contact.admin.inc
Submit handler for the confirm delete category form.
dblog_clear_log_submit in modules/dblog/dblog.admin.inc
Submit callback: clear database with log messages.
dblog_cron in modules/dblog/dblog.module
Implement hook_cron().
dblog_user_cancel in modules/dblog/dblog.module
Implement hook_user_cancel().
drupal_session_destroy_uid in includes/session.inc
End a specific user's session(s).
field_create_field in modules/field/field.crud.inc
Create a field.
field_purge_field in modules/field/field.crud.inc
Purge a field record from the database.
field_purge_instance in modules/field/field.crud.inc
Purge a field instance record from the database.
field_sql_storage_field_storage_delete_revision in modules/field/modules/field_sql_storage/field_sql_storage.module
Implement hook_field_storage_delete_revision().
field_sql_storage_field_storage_purge in modules/field/modules/field_sql_storage/field_sql_storage.module
Implement hook_field_storage_purge().
field_sql_storage_field_storage_write in modules/field/modules/field_sql_storage/field_sql_storage.module
Implement hook_field_storage_write().
file_delete in includes/file.inc
Delete a file and its database record.
filter_format_delete in modules/filter/filter.module
Delete a text format.
flood_clear_event in includes/common.inc
Make the flood control mechanism forget about an event for the current visitor.
forum_field_storage_pre_update in modules/forum/forum.module
Implement hook_field_storage_pre_update().
forum_node_delete in modules/forum/forum.module
Implement hook_node_delete().
forum_node_update in modules/forum/forum.module
Implement hook_node_update().
hook_actions_delete in modules/system/system.api.php
Executes code after an action is deleted.
hook_cron in modules/system/system.api.php
Perform periodic actions.
hook_delete in modules/node/node.api.php
Respond to node deletion.
hook_field_storage_pre_update in modules/field/field.api.php
Act before the storage backends update field data.
hook_file_delete in modules/system/system.api.php
Respond to a file being deleted.
hook_menu_link_delete in modules/menu/menu.api.php
Inform modules that a menu link has been deleted.
hook_modules_uninstalled in modules/system/system.api.php
Perform necessary actions after modules are uninstalled.
hook_node_delete in modules/node/node.api.php
Respond to node deletion.
hook_node_revision_delete in modules/node/node.api.php
Respond to deletion of a node revision.
hook_taxonomy_term_delete in modules/taxonomy/taxonomy.api.php
Respond to the deletion of taxonomy terms.
hook_user_cancel in modules/user/user.api.php
Act on user account cancellations.
hook_user_role_delete in modules/user/user.api.php
Inform other modules that a user role has been deleted.
image_default_style_revert in modules/image/image.module
Revert the changes made by users to a default image style.
image_effect_delete in modules/image/image.module
Delete an image effect.
image_style_delete in modules/image/image.module
Delete an image style.
locale_date_format_reset_form_submit in modules/locale/locale.module
Reset date formats for a specific language to global defaults.
locale_languages_delete_form_submit in includes/locale.inc
Process language deletion submissions.
locale_translate_delete_form_submit in includes/locale.inc
Process string deletion submissions.
locale_translate_edit_form_submit in includes/locale.inc
Process string editing form submissions.
lock_may_be_available in includes/lock.inc
Check if lock acquired by a different process may be available.
lock_release in includes/lock.inc
Release a lock previously acquired by lock_acquire().
lock_release_all in includes/lock.inc
Release all previously acquired locks.
menu_delete in modules/menu/menu.module
Delete a custom menu and all contained links.
node_access_example_node_delete in developer/examples/node_access_example.module
node_access_rebuild in modules/node/node.module
Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
node_access_write_grants in modules/node/node.module
This function will write a list of grants to the database, deleting any pre-existing grants. If a realm is provided, it will only delete grants from that realm, but it will always delete a grant from the 'all' realm. Modules which utilize...
node_cron in modules/node/node.module
Implement hook_cron().
node_delete_multiple in modules/node/node.module
Delete multiple nodes.
node_revision_delete in modules/node/node.module
Delete a node revision.
node_type_delete in modules/node/node.module
Deletes a node type from the database.
node_user_cancel in modules/node/node.module
Implement hook_user_cancel().
openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
openid_user_delete_form_submit in modules/openid/openid.pages.inc
path_delete in includes/path.inc
Delete a URL alias.
poll_cancel in modules/poll/poll.module
Submit callback for poll_cancel_form().
poll_delete in modules/poll/poll.module
Implement hook_delete().
poll_update in modules/poll/poll.module
Implement hook_update().
poll_user_cancel in modules/poll/poll.module
Implement hook_user_cancel().
profile_field_delete_submit in modules/profile/profile.admin.inc
Process a field delete form submission.
profile_user_cancel in modules/profile/profile.module
Implement hook_user_cancel().
rdf_mapping_delete in modules/rdf/rdf.module
Deletes the mapping for the given pair of type and bundle from the database.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_reindex in modules/search/search.module
Wipes a part of or the entire search index.
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).
shortcut_set_delete in modules/shortcut/shortcut.module
Deletes a shortcut set.
shortcut_set_unassign_user in modules/shortcut/shortcut.module
Unassign a user from any shortcut set they may have been assigned to.
simpletest_clean_results_table in modules/simpletest/simpletest.module
Clear the test result tables.
statistics_cron in modules/statistics/statistics.module
Implement hook_cron().
statistics_node_delete in modules/statistics/statistics.module
Implement hook_node_delete().
statistics_user_cancel in modules/statistics/statistics.module
Implement hook_user_cancel().
system_cron in modules/system/system.module
Implement hook_cron().
system_date_format_delete in modules/system/system.module
Delete a date format from the database.
system_date_format_type_delete in modules/system/system.module
Delete a date type from the database.
system_ip_blocking_delete_submit in modules/system/system.admin.inc
Process system_ip_blocking_delete form submissions.
system_update_7003 in modules/system/system.install
Update {blocked_ips} with valid IP addresses from {access}.
system_update_7027 in modules/system/system.install
Enable field type modules.
system_update_files_database in modules/system/system.module
Updates the records in the system table based on the files array.
taxonomy_field_update in modules/taxonomy/taxonomy.module
Implement hook_field_update().
taxonomy_node_delete in modules/taxonomy/taxonomy.module
Implement hook_node_delete().
taxonomy_taxonomy_term_delete in modules/taxonomy/taxonomy.module
Implement hook_taxonomy_term_delete().
taxonomy_term_delete in modules/taxonomy/taxonomy.module
Delete a term.
taxonomy_term_save in modules/taxonomy/taxonomy.module
Save a term object to the database.
taxonomy_test_taxonomy_term_delete in modules/simpletest/tests/taxonomy_test.module
Implement hook_taxonomy_term_delete().
taxonomy_vocabulary_delete in modules/taxonomy/taxonomy.module
Delete a vocabulary.
tracker_cron in modules/tracker/tracker.module
Implement hook_cron().
trigger_actions_delete in modules/trigger/trigger.module
Implement hook_actions_delete().
trigger_assign_form_submit in modules/trigger/trigger.admin.inc
Submit function for trigger_assign_form().
trigger_unassign_submit in modules/trigger/trigger.admin.inc
Submit callback for trigger_unassign() form.
upload_file_delete in modules/upload/upload.module
Implement hook_file_delete().
upload_node_delete in modules/upload/upload.module
Implement hook_node_delete().
upload_node_revision_delete in modules/upload/upload.module
Implement hook_node_revision_delete().
upload_save in modules/upload/upload.module
user_modules_uninstalled in modules/user/user.module
Implement hook_modules_uninstalled().
user_role_delete in modules/user/user.module
Delete a user role from database.
user_role_revoke_permissions in modules/user/user.module
Revoke permissions from a user role.
user_save in modules/user/user.module
Save changes to a user account or add a new user.
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_del in includes/bootstrap.inc
Unset a persistent variable.
_batch_finished in includes/batch.inc
End the batch processing.
_block_rehash in modules/block/block.module
Update the 'block' DB table with the blocks currently exported by modules.
_drupal_session_destroy in includes/session.inc
Session handler assigned by session_set_save_handler().
_drupal_session_garbage_collection in includes/session.inc
Session handler assigned by session_set_save_handler().
_locale_import_one_string_db in includes/locale.inc
Import one string into the database.
_menu_delete_item in includes/menu.inc
Helper function for menu_link_delete; deletes a single menu link.
_menu_router_save in includes/menu.inc
Helper function to save data from menu_router_build() to the router table.
_registry_parse_file in includes/registry.inc
Parse a file and save its function and class listings.
_registry_rebuild in includes/registry.inc
@see registry_rebuild.
_tracker_remove in modules/tracker/tracker.module
Clean up indexed data when nodes or comments are removed.
_update_authorize_clear_update_status in modules/update/update.authorize.inc
Private helper function to clear cached available update status data.
_update_cache_clear in modules/update/update.module
Invalidates cached data relating to update status.
_user_cancel in modules/user/user.module
Last batch processing step for cancelling a user account.

Code

includes/database/database.inc, line 2133

<?php
function db_delete($table, array $options = array()) {
  if (empty($options['target']) || $options['target'] == 'slave') {
    $options['target'] = 'default';
  }
  return Database::getConnection($options['target'])->delete($table, $options);
}
?>
Login or register to post comments
 
 

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.