On Mar 27, 4:00 pm, cpeele <[email protected]> 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 [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