On 13 sep, 21:30, Jeroen <[email protected]> wrote:
> For the whole three I want to sort all the direct childs first on date-
> of birth and then on lastname, so I think the reorder-method won't
> work.
When you tried it - did it work.
>
> I tried the following method:
> $this->Person->children(array(
> 'order' => 'date_of_birth ASC, lastname DESC'))
>
> It works, but it fucks up my whole tree, thats because the tree is
> 'build' as follows:
http://book.cakephp.org/view/771/broken
> $this->Person->children(array(
> 'order' => 'lft'))
>
> When I do the following, the direct childs of every parent are NOT
> sorted by date_of_birth and then by lastname
> $this->Person->children(array(
> 'order' => 'lft, date_of_birth ASC, lastname DESC'))
since you ask for it to be sorted by lft - in what way is that a
surprise?
> Does anyone know how I can sort direct childs of every parent for a
> whole tree at once?
yes ;).
Alternatively use find threaded instead.
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---