Creating a list tree with SQLite

jmwanikk

New Member
I'm trying to make a hierarchical list with PHP and an SQLite table setup like this:\[code\] | itemid | parentid | name | ----------------------------------------- | 1 | null | Item1 | | 2 | null | Item2 | | 3 | 1 | Item3 | | 4 | 1 | Item4 | | 5 | 2 | Item5 | | 6 | 5 | Item6 |\[/code\]The lists would be built with unordered lists and allow for this type of tree structure:\[code\]Item1 |_Item3 |_Item4Item2 |_Item5 |_Item6\[/code\]I've seen this done with directories and flat arrays, but I can't seem to make it work right with this structure and without a depth limit.
 
Back
Top