function variable_store_delete_all in Variable 7
Same name and namespace in other branches
- 7.2 variable_store/variable_store.module \variable_store_delete_all()
Delete realm variable or full realm from store.
Parameters
$realm: Realm name to delete. NULL to delete all realms.
$key: Realm key to delete. NULL to delete all realm keys.
$name: Variable name to delete. NULL to delete all variables for that realm, key
File
- variable_store/
variable_store.module, line 68 - Variable API module - Database storage
Code
function variable_store_delete_all($realm, $key, $name = NULL) {
_variable_store_reset();
$query = db_delete('variable_store');
if (isset($realm)) {
$query
->condition('realm', $realm);
}
if (isset($key)) {
$query
->condition('realm_key', $key);
}
if (isset($name)) {
$query
->condition('name', $name);
}
return $query
->execute();
}