I need some help to find a solution to this problem.
I built a my sql view (queryTree) using a mysql function to pass a parameter.
If i build a temp table using this sql: SELECT * FROM (SELECT @COD:=1044654) parm, queryTree;
and then i use this table to populate the treegrid: $tree->render_table(“temptable”,“ID”,“DESCRIZIONE,VAL1,VAL2,VAL3,VAL4”, “”, “PARENT_ID”);
all runs correctly with fathers and children.
If instead, i use: $tree->render_complex_sql(“SELECT * FROM (SELECT @NDG:=1044654) parm, queryTree;”,“ID”,“DESCRIZIONE,VAL1,VAL2,VAL3,VAL4”, “”, “PARENT_ID”);
the treegrid is populated but with all records as fathers without children except for the first one that is the father of all Others records.
What il the problem ? in the query sintax ?
I specify that, in mysql, the contents of temptable and result of query are exactly the same.
Many thanks for help.