[PHP-DB] where limits?

2003-02-04 Thread Addison Ellis
hello,
	is there a limit to how many where statements one can 
include in a query?
	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');

with no complications and if so, where should i insert it???

i do appreciate your time. best regards, addison
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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



RE: [PHP-DB] where limits?

2003-02-04 Thread John W. Holmes
   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...



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