View Single Post
  #10 (permalink)  
Old October 30th, 2007, 08:03 AM
melkin melkin is offline
Authorized User
Points: 483, Level: 7
Points: 483, Level: 7 Points: 483, Level: 7 Points: 483, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: Edgewood, NY, USA.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can anyone help me?
how can I now set this up as an "if" statement or another way, so I can my code 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 as:
SQL ="SELECT * from customerlogin_test where lastlogin < DATE_ADD(CURRENT_DATE, INTERVAL -90 DAY) ORDER BY lastlogin DESC"

Thanks all.

Reply With Quote