>       please note the time "intervals" that are working. what i
> want is to select only data that is two weeks old or younger. i did a
> test with one day and it worked great. i inserted the two-week/14days
> and neither of them worked. 1 month worked. i could not find anything
> on php.net that directed me to this.  thank you again, addison
> this works:(*note end of syntax "interval 1 day")
>      createdate >=subdate(now(), interval 1 day)");

> this does not: (*note end of syntax "interval 14 days")
>      createdate >=subdate(now(), interval 14 days)");

> this does not: (*note end of syntax "interval 2 weeks")
>      createdate >=subdate(now(), interval 2 weeks)");

> this works: (*note end of syntax "interval 1 month")
>      createdate >=subdate(now(), interval 1 month)");

Take a look at 


and see why DAYS and WEEKS is causing you trouble. 

You're still not checking mysql_error() when you issue a query, are you?
Otherwise you may have figured it out already. And, you're still using
mysql_db_query(), which is depreciated. :( 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to