closeblock.db.inc in Close Block 7
Same filename and directory in other branches
DB model functions.
File
model/closeblock.db.incView source
<?php
/**
* @file
* DB model functions.
*/
/**
* Load the saved information from the db.
*/
function closeblock_db_load($params) {
$query = db_select('closeblock', 'closeblock')
->fields('closeblock');
foreach ($params as $param => $value) {
$query
->condition($param, $value, '=');
}
$result = $query
->execute();
$result = $result
->fetchAll();
return $result;
}
/**
* Delete the saved information from the db.
*/
function closeblock_db_delete($params) {
$query = db_delete('closeblock');
if ($params) {
foreach ($params as $param => $value) {
if ($param == 'theme' && ($value == 'global' || empty($value))) {
continue;
}
$query
->condition($param, $value, '=');
}
}
$result = $query
->execute();
return $result;
}
Functions
Name | Description |
---|---|
closeblock_db_delete | Delete the saved information from the db. |
closeblock_db_load | Load the saved information from the db. |