function db_delete

Same name in other branches
  1. 8.9.x core/includes/database.inc \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

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

File

includes/database/database.inc, line 2597

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.