help me revise my code. this is my sql code:
SELECT lt.loan_amount, lt.rel_date, lt.due_date,
DATEDIFF( lt.rel_date, lt.due_date ) AS span,
(((DATEDIFF( lt.due_date, lt.rel_date )) + curdate()) * 0.02) AS penalty
FROM loan_transaction lt, members m
WHERE lt.MID = m.MID
but the output is a mess. I just wanted to mean with this that when the due_date is over, the 0.02 penalty will apply.
(((DATEDIFF( lt.due_date, lt.rel_date )) + curdate()) * 0.02) AS penalty..
how will i show this in php mysql? I new to this. i'm actually struggling with this. Pls help. Thank you