I have a mysql table for subscription details
It has a start_date, end_date and status field
Now, what i would like to do is whenever end_date of subscription is reached, i would like the status field to change from active to inactive
for example when end_date > curdate, update subscription table set status=inactive
Is there a way to run a check at the end of each day to check and update this?
how can i do this?
解决方案
you can use the cron job in linux based server to check and manipulate the data in db with php