From ea3277d98d8460703433885636fdf105990bacb7 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 26 Jan 2010 13:39:21 +0100 Subject: [PATCH] monthly_circulation_statistics.pl :Hard Coded date inside Fixing that point --- misc/cronjobs/stats/monthly_circulation_statistics.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/stats/monthly_circulation_statistics.pl b/misc/cronjobs/stats/monthly_circulation_statistics.pl index 961d7e4914..57d273b854 100755 --- a/misc/cronjobs/stats/monthly_circulation_statistics.pl +++ b/misc/cronjobs/stats/monthly_circulation_statistics.pl @@ -67,8 +67,8 @@ my $sth3 = $dbh->prepare ("SELECT COUNT(*) FROM biblioitems,items,statistics WHE # number of renewals for this library my $sth4 = $dbh->prepare ("SELECT COUNT(statistics.itemnumber) FROM statistics,items,biblioitems - WHERE YEAR(statistics.datetime)=YEAR(SUBDATE('2007-01-01',INTERVAL 1 MONTH)) - AND MONTH(statistics.datetime)=MONTH(SUBDATE('2007-01-01',INTERVAL 1 MONTH)) + WHERE YEAR(statistics.datetime)=YEAR(SUBDATE(CURDATE(),INTERVAL 1 MONTH)) + AND MONTH(statistics.datetime)=MONTH(SUBDATE(CURDATE(),INTERVAL 1 MONTH)) AND statistics.itemnumber=items.itemnumber AND biblioitems.ccode=? AND homebranch=? -- 2.39.5