Bug 5549 : replace curdate with now in a couple of sql lines

duedate is now datetime and comparing with curdate
causes a system error
This commit is contained in:
Colin Campbell 2011-06-20 15:48:57 +01:00 committed by Chris Cormack
parent d55405047b
commit 7c260e550e
1 changed files with 2 additions and 2 deletions

View File

@ -642,7 +642,7 @@ sub IsMemberBlocked {
"SELECT COUNT(*) as latedocs
FROM issues
WHERE borrowernumber = ?
AND date_due < curdate()"
AND date_due < now()"
);
$sth->execute($borrowernumber);
my $latedocs = $sth->fetchrow_hashref->{'latedocs'};
@ -680,7 +680,7 @@ sub GetMemberIssuesAndFines {
$sth = $dbh->prepare(
"SELECT COUNT(*) FROM issues
WHERE borrowernumber = ?
AND date_due < curdate()"
AND date_due < now()"
);
$sth->execute($borrowernumber);
my $overdue_count = $sth->fetchrow_arrayref->[0];