$sth=$DBH->prepare("SELECT * FROM events WHERE id > $last_id_db AND type = $requested_type_db AND valid = 't' ORDER BY id ASC;");
$sth=$DBH->prepare("SELECT * FROM events WHERE type != 'test' AND id > $last_id_db AND type = $requested_type_db AND valid = 't' ORDER BY id ASC;");
}else{
}else{
my($domain)=$CN=~/([^\.]+\.[^\.]+)$/;
my($domain)=$CN=~/([^\.]+\.[^\.]+)$/;
my$domain_db=$DBH->quote("%$domain");
my$domain_db=$DBH->quote("%$domain");
$sth=$DBH->prepare("SELECT * FROM events WHERE id > $last_id_db AND type = $requested_type_db AND valid = 't' AND hostname NOT LIKE $domain_db ORDER BY id ASC;");
$sth=$DBH->prepare("SELECT * FROM events WHERE type != 'test' AND id > $last_id_db AND type = $requested_type_db AND valid = 't' AND hostname NOT LIKE $domain_db ORDER BY id ASC;");
}
}
if(!defined$sth){die("Cannot prepare statement in getNewEvents: $DBI::errstr\n")}
if(!defined$sth){die("Cannot prepare statement in getNewEvents: $DBI::errstr\n")}