Just startd with oracle 9i and I cant figure out how to properly query the tree from following table with zort ordering
PHP Code:
ID | SUBID | TREEE | LEVEL | ZORT | NAME
---------------------------------------------------------------
1 | 0 |/ | 1 | 1 | first node
---------------------------------------------------------------
2 | 1 |/1/ | 2 | 2 | first subnode
---------------------------------------------------------------
3 | 2 |/1/2/ | 3 | 3 | first subsubnode
---------------------------------------------------------------
4 | 2 |/1/2/ | 3 | 4 | second subsubnode
---------------------------------------------------------------
The tree column holds the paths for tree nodes so i can query the tree with one simple query but i don't know how to query tree by using zort for ordering the tree nodes
Select * from thistable order by concat(tree,to_char(id))
first node
|-first subnode
|--second subsubnode (zort = 4)
|--first subsubnode (zort = 3)
can anybody help me figure this out?