HRS [[email protected]] 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
_______________________________________________
Koha mailing list  http://koha-community.org
[email protected]
http://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to