Hi,
I'm Using CakePHP 1.19. I have a menu table with the following fields:
- id
- parent_id
- name
- link
For sorting purposes, I would like the menu to show ordered by Name
ASC.
When I use:
$this->Menu->findAllThreaded('','','name ASC');
The resulting array only contains siblings with a name that is higher
in the alfabet then the name of the parent. For instance
id: 1
parent_id: null
name: beta
id:2
parent_id: 1
name: alfa
id:3
parent_id:1
name:kappa
Will result in parent 1 having only ONE sibling, id:3 kappa.
A solitution to this behaviour is adding the parent_id to the Order By
clause as the primary sort condition:
$this->Menu->findAllThreaded('','',array('parent_id','name');
I'm wondering if this is expectable behaviour... any thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---