+ $ssql .= " AND srv_date >= '". $torrus_srvderive->last_srv_date. "' "
+ if $torrus_srvderive->last_srv_date;
+
+ $ssql .= $orderlimit;
+
+ warn "searching for times to add $serviceid\n" if $DEBUG;
+ warn $ssql if $DEBUG > 2;
+ my $sth = dbh->prepare($ssql) or die $DBI::errstr; #better recovery?