Lines 277-292
sub GetAllIssues {
Link Here
|
277 |
'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
277 |
'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
278 |
FROM issues |
278 |
FROM issues |
279 |
LEFT JOIN items on items.itemnumber=issues.itemnumber |
279 |
LEFT JOIN items on items.itemnumber=issues.itemnumber |
|
|
280 |
LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer |
280 |
LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber |
281 |
LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber |
281 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
282 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
282 |
WHERE borrowernumber=? |
283 |
WHERE issues.borrowernumber=? |
283 |
UNION ALL |
284 |
UNION ALL |
284 |
SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
285 |
SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
285 |
FROM old_issues |
286 |
FROM old_issues |
286 |
LEFT JOIN items on items.itemnumber=old_issues.itemnumber |
287 |
LEFT JOIN items on items.itemnumber=old_issues.itemnumber |
|
|
288 |
LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer |
287 |
LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber |
289 |
LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber |
288 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
290 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
289 |
WHERE borrowernumber=? AND old_issues.itemnumber IS NOT NULL |
291 |
WHERE old_issues.borrowernumber=? AND old_issues.itemnumber IS NOT NULL |
290 |
order by ' . $order; |
292 |
order by ' . $order; |
291 |
if ($limit) { |
293 |
if ($limit) { |
292 |
$query .= " limit $limit"; |
294 |
$query .= " limit $limit"; |