From 86e4d9352ff76919f7cee73d3e47799cbe83f4fc Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 2 Jul 2009 12:30:05 +0200 Subject: [PATCH] [followup](bug #3080) refix the sql request Content-Type: text/plain; charset="utf-8" This fix the sql request that have some problems of synthax and a table repeated in "FROM". --- acqui/spent.pl | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/acqui/spent.pl b/acqui/spent.pl index 578ed9b..6271b05 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -33,14 +33,12 @@ my $query = quantity-quantityreceived as tleft, aqorders.ordernumber as ordnum,entrydate,budgetdate,booksellerid,aqbasket.basketno - from aqorderbreakdown,aqbasket,aqorders + from aqorderbreakdown,aqorders left join biblioitems on biblioitems.biblioitemnumber=aqorders.biblioitemnumber - LEFT JOINaqbasket USING (basketno) + LEFT JOIN aqbasket USING (basketno) where bookfundid=? and - aqorders.ordernumber=aqorderbreakdown.ordernumber and - aqorders.basketno=aqbasket.basketno - and ( - (datereceived >= ? and datereceived < ?)) + aqorders.ordernumber=aqorderbreakdown.ordernumber + and (datereceived >= ? and datereceived < ?) and (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') and (closedate >= ? and closedate < ?) -- 1.6.0.4