if statements for multiple date checks
Hi Programmers.
Can anyone help me?
how can I now set this up as an "if" statement or another way, so I my code can check 90 days, 120 days, 150 days and 155 days, the delete it.
each date range I set will send an auto email letting that user know they are getting close to being removed.
I am using the SQL statement for MySQL as:
SQL ="SELECT * from customerlogin_test where lastlogin < DATE_ADD(CURRENT_DATE, INTERVAL -90 DAY) ORDER BY lastlogin DESC"
Thanks for your helpl.
|