dhtmlxTree + dhtmlxDataProcessor + mysql ... how to get the

I am using your tree for a project and is simply amazing.

I have ONLY one question, that is smashing my head:

I am using your example that saves the tree structure into a mysql database.



How can I THEN retrieve all the structure in the proper order? Can you suggest me an algorythm?



For proper order I mean displaying all the nodes and subnodes in the same sequence I can see in the tree.



I have only the order_id and the item_parent_id and I can’t figure how to do. With a simple SELECT it doesn’t work.



Thanks for any help









If you are using such data structure ( parentId and orderId ) it can’t be done with single call. - you can create a function which selects data for single level and call it recursive.


function show_data(){
$childs=get_tree_level(id);
foreach ($child as $child_id);
show_data($child_id);
}