When i try to execute this SQL, i got an error, bellow :
SQL Query :
CREATE EVENT fine
ON SCHEDULE
EVERY 1 DAY
DO
if datediff(CURRENT_DATE,transactions.return_date) > 0
UPDATE transactions SET fine = fine + 1000
end if
ERROR : #1054 - Unknown column 'return_date' in 'field list'
and here my transactions table columns :
- id
- user_id
- book_id
- borrow_date
- return_date
- fine
Please anyone help me, much thanks!!