RE: [PHP-DB] "where" limits?
| From: | John W. Holmes | Date: | Wed, 05 Feb 2003 00:39:06 +0000 |
| Subject: | RE: [PHP-DB] "where" limits? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25439@lists.php.net to get a copy of this message | ||
> is there a limit to how many "where" statements one can
> include in a query?
No...
> i am wondering if i can add this:
> where createdate >= subdate(now(),interval 1 month)"
>
> to this:
> $obj = mysql_db_query($dbname,"select a.*,s.name as
> subcategory_name,c.name as category_name from ads a,subcategory
> s,category c where a.subcategory=s.id and s.category=c.id and
> a.subcategory=$id and a.que='checked'");
Just add it onto the end ... a.que='checked' and createdate >=
subdate(now(), interval 1 month)");
You could have had the answer yourself in seconds if you'd of just tried
it.
---John Holmes...