i am doing a library project for my college. in that, i have table called ‘tbl_reserve’ for store reservations. Structure is
Table Structure
There are two date fields to store reservation date and expiry date. ‘reserve_status’ shows is it ‘Reserved/Expired’.
is there is any way to automatic change the value of ‘reserve_status’ field after expiry date.
i am using PHP and MySQL.
You can for example run a process at some fixed interval to check if the reservation has expired this can be done with Cronjob for example.
Another way is to check for expiry every time the table is accessed for whatever reason.