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

Thanks a lot! But forgive me, i need you be a bit more specific…

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);
}

that function sounds a bit strange: get_tree_level(id); what should this function do? and from where is taken the parameted id?

am I feeding this with what? a mysql query with whitch ORDER? Into the data structure there aren’t levels. Only parents and childs…

Please can I get a bit more of light?

Thanks a lot

Alfonso


mygrid.loadXML(“some.php”);


----------- some.php -----------------
<?php

function get_level($id){
$res=mysql_query("SELECT id,text FROM sometable WHERE parentId=".$id);
while ($data = mysql_fetch_assoc($res){
echo "";
get_level($data["id"]);
echo "";
}
}

header("Content-type:text/xml");
echo "<?xml version='1.0' ?>";
get_level(0);
echo “”;
?>