From 2e7f9535f99a334b786b6f9772aadf2a01087482 Mon Sep 17 00:00:00 2001 From: hdl Date: Fri, 20 Jul 2007 14:31:36 +0000 Subject: [PATCH] a query was not mysql5 compliant. --- C4/Bookseller.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index 279f39bd1b..fe0ce8bb45 100755 --- a/C4/Bookseller.pm +++ b/C4/Bookseller.pm @@ -107,20 +107,18 @@ sub GetBooksellersWithLateOrders { if ( $dbdriver eq "mysql" ) { $strsth = " SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name - FROM aqorders, aqbasket + FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id - WHERE aqorders.basketno = aqbasket.basketno - AND (closedate < DATE_SUB(CURDATE( ),INTERVAL $delay DAY) + WHERE (closedate < DATE_SUB(CURDATE( ),INTERVAL $delay DAY) AND (datereceived = '' OR datereceived IS NULL)) "; } else { $strsth = " SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name - FROM aqorders, aqbasket + FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno LEFT JOIN aqbooksellers ON aqbasket.aqbooksellerid = aqbooksellers.id - WHERE aqorders.basketno = aqbasket.basketno - AND (closedate < (CURDATE( )-(INTERVAL $delay DAY))) + WHERE (closedate < (CURDATE( )-(INTERVAL $delay DAY))) AND (datereceived = '' OR datereceived IS NULL)) "; } -- 2.39.5