mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
fix sql for notification resend; see #226
This commit is contained in:
parent
9d31639eef
commit
bdbce9ebe5
@ -286,7 +286,7 @@ sub already_notified {
|
||||
if ($db_type eq 'Pg') {
|
||||
$query = qq{SELECT extract( epoch from (NOW()-notified_at))::int FROM vacation_notification WHERE on_vacation=? AND notified=?};
|
||||
} else { # mysql
|
||||
$query = qq{SELECT NOW()-notified_at FROM vacation_notification WHERE on_vacation=? AND notified=?};
|
||||
$query = qq{SELECT UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(notified_at) FROM vacation_notification WHERE on_vacation=? AND notified=?};
|
||||
}
|
||||
$stm = $dbh->prepare($query) or panic_prepare($query);
|
||||
$stm->execute($to,$from) or panic_execute($query,"on_vacation='$to', notified='$from'");
|
||||
|
Loading…
Reference in New Issue
Block a user