A similar question had been posed on the mailing list a week or so
ago:  http://tinyurl.com/467kx7
The short answer is that if you are using MySQL, you can use ORDER BY
FIELD(id, 2,3,4,5,1).

-Joel.

On Jun 19, 5:17 pm, Fahad <[EMAIL PROTECTED]> wrote:
> i wil make it easy by showing an example.
> lets say, i have only 5 records in my database table. and they all
> have an ID field of 1, 2, 3, 4, and 5.
>
> i want the findAll() to work in such a way so that i can start the
> number of records at a given ID.
> for example, i want the records returned by findAll to start from 2.
> like this: 2, 3, 4, 5, 1 (1 will be added at the end)
>
> when i want to start its ordering from 3, it will be like this:
> 3, 4, 5, 1, 2 (1 and 2 will be added at the end)
>
> can anyone help me with it?
>
> thanks
--~--~---------~--~----~------------~-------~--~----~
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