Hi.


> how about:
>
> select record.*
> from link
> where group_id='x'
> left join record on record.archive_id=link.archive_id
> ?

The problem with this query is that with simple left join, I can search only by a single group.
If I set x to 3 here, I get all records that belong to group 3. But what about if I want to have all records that belong to groups 1 AND 3? If I add condition "WHERE group_id='1' AND group_id='3'", I get no results at all, since left join doesn't produce such rows that have multiple group_id columns.



Sincerely,


Jouni Hartikainen
[EMAIL PROTECTED]

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to