Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2007, 09:53 AM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple LIKE statements melkin MySQL 3 December 17th, 2008 03:38 PM
Multiple IIF Statements rohit_ghosh Access 2 May 7th, 2007 03:05 PM
Multiple IIF statements Corey Access 1 November 16th, 2006 05:25 PM
executing multiple statements jae_green PHP Databases 1 July 7th, 2003 02:19 PM
Multiple Insert Statements tp194 Classic ASP Databases 8 June 11th, 2003 01:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.