global $dbms;
//Find checks that have to be executed.
$local_sql = "select * from notification_check where age(last_execution) > time_between_executions";
$dbms->query($local_sql);
for ($i=0; $i<$dbms->num_rows(); $i++) {
global $dbms;
//Find checks that have to be executed.
$local_sql = "select * from notification_check where age(last_execution) > time_between_executions";
$dbms->query($local_sql);
for ($i=0; $i<$dbms->num_rows(); $i++) {