TT#17258 check active flag of voip_reminders

Change-Id: I9c77410fdc95fab173876e194482d213f785a4dc
changes/20/13920/1
Gerhard Jungwirth 9 years ago
parent 20a53da2f4
commit 1f000b912f

@ -29,9 +29,10 @@ my $dbh = DBI->connect($dsn, @{cfg}{qw(dbuser dbpassword)})
my $sth = $dbh->prepare("SELECT a.username, b.domain, c.recur, c.id " .
"FROM voip_subscribers a, voip_domains b, voip_reminder c " .
"WHERE c.subscriber_id = a.id and a.domain_id = b.id " .
"and c.time = time_format(now(), '%H:%i:00')");
"and c.time = time_format(now(), '%H:%i:00')" .
"and c.active = 1");
my $sth_d = $dbh->prepare("delete from voip_reminder where id=?");
my $sth_d = $dbh->prepare("UPDATE voip_reminder SET active=0 WHERE id=?");
$sth->execute() or die "Cannot execute: ".$DBI::errstr;

Loading…
Cancel
Save