function db_delete

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

DeleteQuery A new DeleteQuery object for this connection.

Related topics

2 calls to db_delete()
_update_authorize_clear_update_status in drupal/core/modules/update/update.authorize.inc
Clears cached available update status data.
_update_cache_clear in drupal/core/modules/update/update.module
Invalidates cached data relating to update status.

File

drupal/core/includes/database.inc, line 345
Core systems for the database layer.

Code

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