On 6/13/07, abocanegra <[EMAIL PROTECTED]> wrote:
>
> I am making a dashboard for my CMS that I built using cake.  I am
> attempting to make it so that it lists only the most recent post for
> each section on the dash board, or possibly the 3 most recent posts.

Presuming your 'category' hasMany 'post',  a way to achieve this would
be to unbind it and bind it again with limit of 3 and order created
DESC parameters.

After this if you do a $this->category->findall() call you will get
all the categories with latest 3 posts - what remains is displaying it
in the view - which I would presume you know how to...


T

-- 
=============================================================
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=============================================================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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