another noobism

This commit is contained in:
Steven Mondji-Lerider 2013-04-22 13:42:37 +00:00
parent c5357f6be2
commit 669dab2913
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class m_action {
$err->raise("action",_("Error setting actions")); $err->raise("action",_("Error setting actions"));
return false; return false;
} }
$purge="delete actions where HOUR(now()) - HOUR(creation) > 1;"; $purge="delete from actions where HOUR(now()) - HOUR(creation) > 1;";
if(!$db->query($purge)){ if(!$db->query($purge)){
$err->raise("action",_("Error purging old actions")); $err->raise("action",_("Error purging old actions"));
return false; return false;
@ -118,7 +118,7 @@ class m_action {
global $db,$err; global $db,$err;
$tab=array(); $tab=array();
$db->query('select * from actions where end is null and begin is null order by id limit 1;'); $db->query('select * from actions where end =0 and begin = 0 order by id limit 1;');
if ($db->next_record()){ if ($db->next_record()){
$tab[]=$db->Record; $tab[]=$db->Record;
return $tab; return $tab;