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
--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.
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