However that required a lot of perl glue and I wondered if there was any more elegant method to retrieve the tree from the database?
You might want to consider using an alternate nested set representation of trees, rather than storing a parent ID for each node. Using this representation you can get a subtree with a single SQL query, no recursion necessary.
In reply to Re: (OT?) Recursive sql queries?
by adrianh
in thread (OT?) Recursive sql queries?
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |