Hello all,

I have some ranking system and got some id by rank (not in field but
processed by script in controller) like this : array('4','2','3'); 

So, i want paginate this.

$result = array('4','2','3');
$this->paginate = $this->Photo->paginateSearch();
$this->set('photos',this->paginate('PhotoAlbum',array('PhotoAlbum.photo_album_id'=>$result)));

But it retrieve result :
photo[2]
photo[3]
photo[4] 

I want it ordered by condition :
photo[4]
photo[2]
photo[3]

Anyone can help me how to order pagination by condition id? 

in pure mysql query like this : ORDER BY FIELD( id, 5, 34, 9, 25 )

Many thanks


--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to