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