Hey,
I have made a query where i want to select a parent and its childs.
I want the array to be like the normal cake structure

[PARENT]
infomation
---------------[CHILDS]
-------------------------[0] information
-------------------------[1] information
-------------------------[2] information

Im to big of a sql writer. I came up with this:

SELECT * FROM content_table AS Content ,content_table AS Childs WHERE
Content.id = Childs.parent_id AND Content.id = '$id' ORDER BY
Content.position,Childs.position,Content.name,Childs.name

I know about the findAllthreaded function but it has limited selecting
capability.
The findAllThreaded method can't begin somewhere in the middle of the
tree and find the childs from that level or id.

My query returns another sort of array. Every child gets retrieved and
has a parent information array in the row. When the parent has no
childs nothing gets returned but i need the parent information
nevertheless.

Can somebody send me in the right direction with this problem?
thanx Tim


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to