RE: Convert subselect query to pre-subselect query

2004-10-08 Thread Ed Lazor
Doh... Guess I spoke too soon. I get it now. I wasn't seeing a.CategoryID=b.ID =) > -Original Message- > select a.ID > from products a, categories b > where a.CategoryID=b.ID and (b.ID='21' OR b.ParentID='21') -- MySQL General Mailing List For list archives: http://lists.mysql.co

RE: Convert subselect query to pre-subselect query

2004-10-08 Thread Ed Lazor
--Original Message- > From: Remi Mikalsen [mailto:[EMAIL PROTECTED] > Sent: Friday, October 08, 2004 5:07 PM > To: [EMAIL PROTECTED] > Subject: Re: Convert subselect query to pre-subselect query > > Try this... > > select a.ID > from products a, categories b > where a.

Re: Convert subselect query to pre-subselect query

2004-10-08 Thread Remi Mikalsen
Try this... select a.ID from products a, categories b where a.CategoryID=b.ID and (b.ID='21' OR b.ParentID='21') The query is pretty straigthforward and I believe it's quite easy to understand. Hope this is what you wanted! A tip... only use left and right joins whenever you want what is on t