diff --git a/library-express/loanitems.js b/library-express/loanitems.js index 9d6ddf1..70966e2 100644 --- a/library-express/loanitems.js +++ b/library-express/loanitems.js @@ -2,7 +2,7 @@ module.exports = function () { var express = require('express'); var router = express.Router(); /*Get loan item data from database*/ - function getLoanItems(res, mysql, context, complete) { +function getLoanItems(res, mysql, context, complete) { var sql = "SELECT li.loanID, l.memberID, li.bookID, CONCAT(p.firstName, ' ', p.lastName) as 'patronName', t.bookTitle, DATE_FORMAT(li.dueDate, '%m/%d/%Y') as 'dueDate', ls.statusDescription, li.renewalCount FROM LoanItems li INNER JOIN LoanStatus ls ON li.loanStatus = ls.statusID INNER JOIN Loans l ON li.loanID = l.loanID INNER JOIN Patrons p ON l.memberID = p.memberID INNER JOIN Books b ON li.bookID = b.bookID INNER JOIN Titles t ON b.ISBN = t.ISBN ORDER BY li.loanID;"; mysql.pool.query(sql, function (error, results, fields) { if (error) {