I would say it is because you need and "or" in
ct.Fk_Targets_Id='1' and ct.Fk_Targets_Id='3'
and not an "and". How can a column equal 2 different values at the same
time?
----- Original Message -----
From: "Simon" <[EMAIL PROTECTED]>
To: "Mysql" <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 2:08
Subject: Help - Selecting from many to many table.
> Hello,
>
> I am new to SQL and just learning.
>
> I have a table of clients and a table of targets. I have a
clients_targets
> table holding the keys for relating.
>
> I am having troble trying to select clients that are in more than one
> target.
>
> Eg. Select c.First_Name, ... From clients as c, clients_targets as ct,
> targets as t Where ct.Fk_Client_Id=c.Id and ct.Fk_Targets_Id=t.Id and
> ct.Fk_Targets_Id='1' and ct.Fk_Targets_Id='3' Group By c.Id
>
> Thanks in Advance,
>
> Simon
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php