"Dave Watkinson" <[EMAIL PROTECTED]> wrote in message
PS This is for a web page, so it's PHP related!!! :-)

-----Original Message-----
From: Dave Watkinson
Sent: 09 August 2001 12:51
To: PHP-DB List (E-mail)
Subject: [PHP-DB] Another SELECTING problem :-(

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

I have (many many many) tables ... two of which are linked by a third,
so that there can be a one-to-many relationship.

>>>>three tables defines a many to many relationship.
>>>>a one to many is defined by posting a foreign key.
>>>>try it with 2 tables.

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

empid, count(empid)
emp_cont , employers, contacts
emp_cont.empid = employers.uid
emp_cont.contid = contacts.uid
count(empid) > 1;

and get all kinds of invalid grouping messages

many TIA


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to