cake-php@googlegroups.com
[Top] [All Lists]

Re: 1.3 Pagination: disable default ordering...

Subject: Re: 1.3 Pagination: disable default ordering...
From: tricky999
Date: Wed, 13 Oct 2010 14:26:14 -0700 PDT
I finally stumbled on the solution.  My search results were returned
as an array, the order of which was important.
This is the final piece of code I used:
$this->paginate =
array('limit'=>10,'conditions'=>array('PortfolioEntry.id'=>
$result),'order'=>array('FIELD(PortfolioEntry.id,'.implode(',',
$result).')'));
where $result is an array containing the relevant id's in the order I
want the results to be displayed.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>