|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Query To Get Yearly Update
I need to create a way to send an email requesting people to re-submit a questionnaire to my database exactly one year after they posted the original.
I need a way of automating this or at least flagging up entries that are over a year old. I'm not sure how to set up the loop to compare the date_of_registration with the current date. I'm using php with a mySQL database. The date_of_registration field is a 'date' datatype. Any ideas would be gratefully received. Alf |
|
#2
|
|||
|
|||
|
RE: Query To Get Yearly Update
|
|
#3
|
||||
|
||||
|
RE: Query To Get Yearly Update
You can also use:
SELECT * FROM TableName WHERE date_of_registration <= NOW() - INTERVAL 1 YEAR |
|
#4
|
|||
|
|||
|
RE: Query To Get Yearly Update
Well, sure, if you wanna do it the easy way. :rolleyes:
|
|
#5
|
|||
|
|||
|
RE: Query To Get Yearly Update
Many thanks both of you. I'm just about to try them.......
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Query To Get Yearly Update |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|