SELECT p.cardnumber AS 'Card Number', concat(p.firstname, " ", p.surname) AS 'Name', As 'E-Mail', c.issuedate AS 'Issue Date',c.date_due AS 'Due Date',
(TO_DAYS(curdate())-TO_DAYS( date_due)) AS 'Days Overdue',(TO_DAYS(curdate())-TO_DAYS( date_due))*5 AS 'Fine',
b.title AS 'Title', AS 'Author', i.itemcallnumber AS'Call No.',
i.barcode AS'Barcode'
FROM borrowers p
LEFT JOIN issues c ON (p.borrowernumber=c.borrowernumber)
LEFT JOIN items i ON (c.itemnumber=i.itemnumber)
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
WHERE c.branchcode = <<Branch|branches>> AND c.date_due < curdate()
ORDER BY p.surname ASC, p.firstname ASC, c.date_due ASC

2018-02-13 00:00:00

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.