Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare two dates with a number

Status
Not open for further replies.

claust

Programmer
May 9, 2010
1
DK
Hi

I have a small php website where I need to compare todays date with a registration date and if the date is exactly 40 days ago I will send a mail out

I have the following query, but it is not working - anybody got an idea why

$query = "SELECT name,email,date FROM tabel1 WHERE TO_DAYS(tabel1.date) - TO_DAYS(CURRENT_DATE) == 40"

Hope for a response soon

Regards
Claus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top