Versions | |
---|---|
7 – 8 | 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.
DeleteQuery A new DeleteQuery object for this connection.
includes/
<?php
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);
}
?>