I am trying to do something i thought was simple, but it is now giving me a headache.
This is what I want-
ALL RECORDS IN THE DATABASE THAT ARE OLDER THAN 14 DAYS OLD.
This application will purge the applicants after 14 days basically and I need it to query correctly.
In the testing phase, I can't get the query right. Can someone help me?
Here is the Query I have so far:
$Query1 = "SELECT * from $TableName1 where status ='3' AND (NOW(DAYOFMONTH) >= DAYOFMONTH(datejoin) - 14) ";
datejoin is the field that is automatically generated when they enter the application.
status is the field that is automatically set to be 3, which is pending.
Thank you for any and all help, I am not used to date expressions on MYSQL databases.