4 Feb
2014
4 Feb
'14
1:05 p.m.
HRS [bala.allmail@gmail.com] wrote:
In looking SQL queries for
1. Who has issued the given barcoded book? and when? 2. What are the books issued by staff-ID( with time) ?
SELECT action_logs.timestamp, borrowers.userid, borrowers.firstname, borrowers.surname, action_logs.action, items.barcode, biblio.title FROM action_logs, borrowers, items, biblio WHERE action_logs.action = 'ISSUE' AND action_logs.user = borrowers.borrowernumber AND items.biblionumber = biblio.biblionumber AND items.itemnumber = action_logs.info This will list all issues. To search for a specific barcode just add a line like: AND items.barcode = 1234 To search for staff-ID add: AND borrowers.userid = 'example' Regards Holger