function slickgrid_delete_settings in Slickgrid 6
Same name and namespace in other branches
- 7 slickgrid.module \slickgrid_delete_settings()
Delete settings from the database
Parameters
array $params: Can be any key value pair where key is the table field, value is the value (like UID, view name) to retrieve
2 calls to slickgrid_delete_settings()
- slickgrid_user in ./
slickgrid.module - Implementation of hook_user().
- slickgrid_views_plugin::options_submit in ./
slickgrid_views_plugin.inc
File
- ./
slickgrid.module, line 556
Code
function slickgrid_delete_settings($params) {
$conj = '';
if (count($params)) {
$sql = 'DELETE FROM {slickgrid} WHERE ';
foreach ($params as $field => $param) {
$sql .= $conj . $field . ' = "%s"';
$conj = ' AND ';
}
db_query($sql, $params);
}
}