On Mar 27, 3:53 pm, mscdex <msc...@gmail.com> wrote:
> On Mar 27, 4:00 pm,cpeele<chris.peel...@gmail.com> wrote:
>
> > Hey guys,
>
> > I am trying to just get a list of Products ordered by created desc but
> > I can't seem to get it.
>
> > Products have a "name" field so I am using findAllByName($name). I
> > have tried various things but can't seem to get it.
>
> The findAllBy function by itself does not permit any ordering. You may
> have to use a normal find statement like: $this->Project->find('all',
> array('conditions' => array('Project.name' => $name), 'order' =>
> 'Project.created DESC'));
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
Friday, March 27, 2009
Re: Help! How to order by created desc with findAllByName( ) method
That Worked! Thanks very much!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment