function db_delete

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

3 calls to db_delete()
path_delete in drupal/includes/
Delete a URL alias.
_update_authorize_clear_update_status in drupal/modules/update/
Clears cached available update status data.
_update_cache_clear in drupal/modules/update/update.module
Invalidates cached data relating to update status.


drupal/includes/database/, line 2536
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);