function brilliant_gallery_clean_table_image_arrays in Brilliant Gallery 6.4
Same name and namespace in other branches
- 7 brilliant_gallery_cron.inc \brilliant_gallery_clean_table_image_arrays()
1 call to brilliant_gallery_clean_table_image_arrays()
File
- ./
cron.inc, line 14
Code
function brilliant_gallery_clean_table_image_arrays() {
$deletecreatedbeforethistime = time() - brilliant_gallery_get_days_in_seconds(variable_get('brilliant_gallery_cache_duration', 90));
$deletecreatedbeforethistime = date('Y-m-d H:i:s', $deletecreatedbeforethistime);
//echo "DELETE FROM {brilliant_gallery_image_arrays} WHERE datetime < '".$deletecreatedbeforethistime."'"; exit();
//$test = "DELETE FROM {brilliant_gallery_image_arrays} WHERE datetime < '".$deletecreatedbeforethistime."'";
$dbres = db_query("DELETE FROM {brilliant_gallery_image_arrays} WHERE datetime < '" . $deletecreatedbeforethistime . "'");
while ($node = db_fetch_object($dbres)) {
// Perform operations on $node->body, etc. here.
}
}