function db_delete in Drupal 7
Same name and namespace in other branches
- 8 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
8 calls to db_delete()
- path_delete in includes/
path.inc - Delete a URL alias.
- system_update_7003 in modules/
system/ system.install - Update {blocked_ips} with valid IP addresses from {access}.
- system_update_7061 in modules/
system/ system.install - Migrate upload.module data to the newly created file field.
- system_update_7063 in modules/
system/ system.install - Delete {menu_links} records for 'type' => MENU_CALLBACK which would not appear in a fresh install.
- system_update_7065 in modules/
system/ system.install - Remove the default value for sid.
File
- includes/
database/ database.inc, line 2587 - 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);
}