$sortby = "Model.field1 desc, Model.field2 desc";
And set debug up to 2 in core.php to check the query it's performing.
On 6/21/06,
Siegfried Hirsch <[EMAIL PROTECTED]> wrote:
Hello there,
I just came across a problem with sorting in the findAll function.
I just coded:
$sortby = "field1 desc,field2 desc";
$this->set( 'data', $this->Top->findAll("activ = 1", null, $sortby));
As you can see, I want to sort on both files descending. But this
does not work, instead it produces the list ascending.
While I have a workaround by using query, I wanted to know if
some else had this problem before
Siegfried
--
Siegfried Hirsch
http://www.rss-blogger.de / http://seconds11.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
-~----------~----~----~----~------~----~------~--~---
- Re: findAll and sorting Repsah
- Re: findAll and sorting Siegfried Hirsch
