|Hi Guys, I have a table with a timestamp (ts) and status field and I want to update it if todays date (when the script is run) is greater then or equal to two days or more. This is what I am trying to write in easy terms. |
UPDATE sale SET status=5 WHERE currenttime>=(ts + 2 days) && status=1
I know this can be done strickly with mysql. I am going to run this script once a day automatically but I need this query worked out. Any thoughts.