From baaf383574b72b039945a248c273402b7008c810 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 13 Aug 2013 10:56:15 -0300 Subject: [PATCH] Bug 10606: Remove MySQLism in GetUpcomingDueIssues Removing this mysqlism as Galen proposed. Sponsored-by: Universidad Nacional de Cordoba --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c578213..d557dbb 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2426,7 +2426,8 @@ FROM issues LEFT JOIN items USING (itemnumber) LEFT OUTER JOIN branches USING (branchcode) WHERE returndate is NULL -HAVING days_until_due > 0 AND days_until_due < ? +AND (TO_DAYS( date_due )-TO_DAYS( NOW() )) > 0 +AND (TO_DAYS( date_due )-TO_DAYS( NOW() )) < ? END_SQL my @bind_parameters = ( $params->{'days_in_advance'} ); -- 1.7.9.5