Lines 154-160
select aqbasket.*, count(*) as total, borrowers.firstname, borrowers.surname
Link Here
|
154 |
from aqbasket left join aqorders on aqorders.basketno = aqbasket.basketno |
154 |
from aqbasket left join aqorders on aqorders.basketno = aqbasket.basketno |
155 |
left join borrowers on aqbasket.authorisedby = borrowers.borrowernumber |
155 |
left join borrowers on aqbasket.authorisedby = borrowers.borrowernumber |
156 |
where booksellerid = ? |
156 |
where booksellerid = ? |
157 |
AND ( aqorders.quantity > aqorders.quantityreceived OR quantityreceived IS NULL) |
|
|
158 |
AND datecancellationprinted IS NULL |
157 |
AND datecancellationprinted IS NULL |
159 |
group by basketno |
158 |
group by basketno |
160 |
ENDSQL |
159 |
ENDSQL |
161 |
- |
|
|