I looked a little further, this link is much better with examples and code.
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ On Thu, Mar 15, 2012 at 9:36 AM, Ben Petersen <[email protected]>wrote: > Karen, > > Take a look a "nested sets". > > http://en.wikipedia.org/wiki/Nested_set_model > http://www.sqlteam.com/article/more-trees-hierarchies-in-sql > > It takes a minute or two to wrap your head around, but is an elegant > solution (I think) to what you're proposing -- with unlimited levels. No > cursors, but could be write intensive if that is a concern, though I > wouldn't imagine any more than a cursor loop. > > Ben > > > > > > On Thu, Mar 15, 2012 at 8:55 AM, <[email protected]> wrote: > >> Dan: That's the way I was going to go, a definite number of cursors. I >> feel >> better knowing that at least one person did it in that manner! I'll >> give it a while >> and if no one has code for unlimited levels, then I'll just go with >> that. Thanks! >> >> Karen >> >> >> In a message dated 3/15/2012 10:44:55 AM Central Daylight Time, >> [email protected] writes: >> >> >> I use cursors. I just set up for expected level of boms that we could >> possibly imagine using. We only go to a max of 6 levels down into the bom >> so I put in 8 cursor levels to just in case and put an error message if it >> finds something below 8 levels so I can add more someday. >> >> I know Rbase does not support celko’s nested boms so I use cursors >> instead. >> >> Dan >> >> >> >> >> >

