At 11:03 +1100 12/4/02, Chris Kay wrote:
>How would I go about grabbing all records where a field is older than 21
>days and set to a certain status.
Dunno what you mean by "set to a certain status", but the other part will
be:
WHERE datetime_field < DATE_SUB(NOW(),INTERVAL 21 DAY)
>
>I tried INTERVIAL 21 Day but I cant seem to get it to work
Seems like you were on the right track, but you don't show your
actual query, so we can't comment on it.
>
>Field in the database is datetime
>
>Am I doing something wrong? Or is there a easier way to do this, would
>someone mind giving me a example query where I would add 21 days to a
>datetime field
>
>
>Mysql, query
>---------------------------------------------------------
>Chris Kay (Systems Development)
>Techex Communications
>Website: www.techex.com.au Email: chris.kay@stripped
>Telephone: 1300 88 111 2 - Fax: (02) 9970 5788