I've a feeling I've asked this before, but checked my old messages and
couldn't see it in there for the excess of non PHP-Database questions
flying around (yep - that's a joke, but I've been here a while - forgive
me!).
 
I have (many many many) tables ... two of which are linked by a third,
so that there can be a one-to-many relationship. What I'd like to do is
find which ids from table 1 have more than one relation in table 2, via
table 3.
 
I've tried this...
 
select 
empid, count(empid) 
from 
emp_cont , employers, contacts
where
emp_cont.empid = employers.uid
and
emp_cont.contid = contacts.uid
and
count(empid) > 1;
 
and get all kinds of invalid grouping messages
 
many TIA
 
 
Dave
 

Reply via email to