RE: [PHP-DB] Another SELECTING problem :-(

From: Date: Thu, 09 Aug 2001 11:52:01 +0000
Subject: RE: [PHP-DB] Another SELECTING problem :-(
Groups: php.db 
Request: Send a blank email to php-db+get-11178@lists.php.net to get a copy of this 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 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

« previous php.db (#11178) next »