I've been working on a subquery for several hours and can't figure it
out in cakephp. I've tried mimicking the example in the book under
complex find conditions and couldn't seem to make that work.

Here is the query that when run manually in mysql works. The inner
query is used to take out the duplicates for the count. Any help would
be appreciated. Thanks in advanced

SELECT COUNT(*) , zipcode, county, city
FROM (
SELECT zipcode, county, city
FROM table
WHERE zipcode IN ('34134', '34135', '33928', '34134', '34135')
GROUP BY address, city, state
) AS table
GROUP BY zipcode

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to