Wednesday, December 26, 2012

using group by and order by together

Hello friends,

I have a doubt, I am working with two tables categories and posts on a given query want to display in my home only 1 post from each category, the last. As if it was the home of a forum.

I am able to display one post from each category, but they can not be the last registered.

Follow my code using group by and order by together
http://bin.cakephp.org/saved/84693

Does anyone by chance has gone through this problem?

Thank you in advance!
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: