dynamic hashed treeby norbu09 (Initiate)
|on Aug 05, 2003 at 14:50 UTC
norbu09 has asked for the wisdom of the Perl Monks concerning the following question:
the problem i want to solve is the dynamic creation of a hashed tree from the result of a database query. i tried to solve it with arrays only the success was minor. what i need is a tree of the following scheme:
the problem is that the structure has no defined depth. and btw, though it looks like another forum aproach it isn't. :)
here is what i tried:
the result as you may figure out is a array with tree arrays in it without assotiation to the parent.
the database structure is a nested set as found at celko's "sql for smarties", just modified to have more smaller trees instead of one giant one to speed up inserts.