I have a MySQL database using phpmyadmin.
I have a table consisting ID (integer), Status (integer), and Date (timestamp).
For example :
-------------------------------------------
ID | Status | Date
-------------------------------------------
1 | 1 | 2019-05-10 00:00:00
2 | 1 | 2019-05-11 00:00:00
-------------------------------------------
I want to change the Status value from 1 into 2 when the SYSDATE is reaching the Date record. How can I do that ?
Thank you 🙂
4
Answers
Try this option:
This assumes that your
Date
column in fact stores just dates. If it stores timestamps, and you only want to flag when the current timestamp exceeds theDate
column, then useSYSDATE()
instead:You could use
You can:
or
And set them to run e.g. for every day.
Try This
OR