You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: findfine.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
$q=$_POST['searchword'] || "";
15
15
16
-
$sql_res="SELECT *FROM borrower INNER JOIN book_loans ON book_loans.card_no = borrower.card_no INNER JOIN fines ON book_loans.loan_id = fines.loan_id WHERE book_loans.card_no like '%$q%' or fname like '%$q%' or lname like '%$q%' ";
16
+
$sql_res="SELECT *, SUM(fine_amt) AS total_fine FROM borrower INNER JOIN book_loans ON book_loans.card_no = borrower.card_no INNER JOIN fines ON book_loans.loan_id = fines.loan_id WHERE book_loans.card_no like '%$q%' or fname like '%$q%' or lname like '%$q%' GROUP BY book_loans.card_no";
0 commit comments