Skip to content

Instantly share code, notes, and snippets.

@black23
Created January 2, 2017 15:13
Show Gist options
  • Save black23/0578c5dd874cc1c2b19e3d257982c7f0 to your computer and use it in GitHub Desktop.
Save black23/0578c5dd874cc1c2b19e3d257982c7f0 to your computer and use it in GitHub Desktop.
SELECT concat('<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=', `old_issues`.`borrowernumber`, '">', firstname, ' ', surname, '</a>') as 'Čtenář',
concat('<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=', items.biblionumber, '">', items.barcode, '</a>') as 'Jednotka',
date_format(old_issues.timestamp, "%e.%c.%Y %H:%i:%s") as 'Zpracováno'
FROM old_issues
JOIN borrowers on old_issues.borrowernumber = borrowers.borrowernumber
JOIN items ON old_issues.itemnumber = items.itemnumber
WHERE `old_issues`.`timestamp` != `old_issues`.`returndate`
AND DATE(old_issues .timestamp) = CURDATE()
ORDER BY old_issues.timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment