[Koha] All old circulation issues and their corresponding borrowers and the titles of the items borrowed

schnydszch eugenegf at yahoo.com
Wed Apr 24 13:02:45 NZST 2013


Good day Koha users and developers! I would like to share this mysql report
that I came up to when my boss requested me to show all old circulation
issues since the beginning. I went to the koha mysql report wiki but did not
find what my boss wanted so I just created one and I'm sharing it. 
Here is the mysql query:
SELECT old_issues.*, borrowers.cardnumber, borrowers.surname,
borrowers.firstname, borrowers.sort1, borrowers.sort2, items.barcode,
items.datelastborrowed, items.datelastseen, items.itemcallnumber,
items.issues, items.holdingbranch, items.location, items.permanent_location,
items.onloan, items.ccode, items.itype, items.enumchron, items.copynumber,
items.location, b.totalissues, EXTRACTVALUE( b.marcxml, 
'//datafield[@tag="245"]/subfield[@code>="a"]' ) as TITLE FROM old_issues
LEFT JOIN borrowers ON ( borrowers.borrowernumber =
old_issues.borrowernumber ) 
LEFT JOIN items ON ( items.itemnumber = old_issues.itemnumber ) 
LEFT JOIN biblioitems AS b ON ( items.biblioitemnumber = b.biblioitemnumber)



--
View this message in context: http://koha.1045719.n5.nabble.com/All-old-circulation-issues-and-their-corresponding-borrowers-and-the-titles-of-the-items-borrowed-tp5752064.html
Sent from the Koha-general mailing list archive at Nabble.com.


More information about the Koha mailing list