I know there are lots of posts about time problems but here's another.
I have a database storing information from questionnaires. The mySQL database has a date field date_of_registration which stores the date the user submitted the questionnaire i.e 2002-4-11
What I need to do is flag up those users whose entry was submitted more than one year ago ,a nd send them a reminder to update their info.
I've tried the following code:
$queryGetAnnualUpdates = "SELECT practitioner_forename, practitioner_surname, course_code, course_title, date_of_registration
FROM (t_institution
INNER JOIN t_course ON t_institution.institution_code = t_course.institution_code)
INNER JOIN t_practitioner ON (t_institution.institution_code =
t_practitioner.institution_code)
AND (t_course.practitioner_code = t_practitioner.practitioner_code)
WHERE (date_of_registration <= NOW() - INTERVAL 1 YEAR)";
But I can't get it to return any data .
There is an entry for that is over one year old.
Any help would be gratefully received.
Thanks,
Alf