function db_delete

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

Returns a new DeleteQuery object for the active database.


$table: The table from which to delete.

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

Return value

DeleteQuery A new DeleteQuery object for this connection.

Related topics

169 calls to db_delete()
ActionLoopTestCase::testActionLoop in drupal/modules/simpletest/tests/actions.test
Set up a loop with 3 - 12 recursions, and see if it aborts properly.
actions_delete in drupal/includes/
Deletes a single action from the database.
aggregator_aggregator_remove in drupal/modules/aggregator/
Implements hook_aggregator_remove().
aggregator_categorize_items_submit in drupal/modules/aggregator/
Form submission handler for aggregator_categorize_items().
aggregator_expire in drupal/modules/aggregator/
Expires items from a feed depending on expiration settings.

... See full list


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


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