I am trying to build a parent child hierarchy from a mysql table and am looking for an effiecient way to dynamically do this.
What I have is a table with two fields [name] and [parent].
The [name] field is unique. The [parent] column for each [name] refers to what object the name falls under.
Example Table:
[NAME] [PARENT]
1
2 1
3 1
4 2
5 2
This table would build a hierarchy like:
EX:
1 - Top Level
2 - Parent is 1
4 - Parent is 2
5 - Parent is 2
3 - Parent is 1
I would like to display a "hierarchy" on the web dynamically from the database.
hope this make sense.
thanks