not only for your problem, but for "correct" neighbors in general
if you use UUIDs you dont have sorted IDs anyway
and sometimes you have to sort by more than just 1 field etc..
On 25 Sep., 17:27, mklappen <mklap...@gmail.com> wrote:
> Hi
>
> Is there a way I can sort a query and then have the find (neighbors)
> based on that sort?
>
> I'm trying to sort my results by title and then would like prev/next
> elements returned by neighbors to be the prev/next title in alpha
> order. However, neighbors is returing the prev/next ids which are not
> in alpha order.
>
> $this->Game->find('neighbors',array
> ('fields'=>'Game.title','order'=>'Game.title ASC'));
>
> 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment