NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT - MySQL select question

Aaron Fischer agfische at email.smith.edu
Thu Dec 7 11:13:39 EST 2006


That did it, thanks Rob and Andy.

Rob's query did the trick.  I was getting a MySQL error with Andy's that 
I hadn't been able to figure out.

Cheers,

-Aaron


Rob Marscher wrote:
> I'm pretty sure the subquery is redundant... I think this will work...
> 
> SELECT * FROM table_name GROUP BY field_name HAVING COUNT(*) > 1
> 
> 
> 
> Andy Dirnberger wrote:
> 
>> SELECT * FROM table_name WHERE field_name IN (SELECT field_name FROM
>> table_name GROUP BY field_name HAVING COUNT(*) > 1)
>>



More information about the talk mailing list