I’m working with hierarchical data in my cms. My menu table is this: id || name || lft || rgt And my left and right columns are: To retrieving a full tree and it’s depth, I’ve found this query: …
Tag: hierarchical-data
Convert a series of parent-child relationships into a hierarchical tree?
I have a bunch of name-parentname pairs, that I’d like to turn into as few heirarchical tree structures as possible. So for example, these could be the pairings: Which needs to be transformed into (a) heirarchical tree(s): The end result that I want is a nested set of <ul> elements, with each <li> containing the child’s name. There are no