Thread
:
Inserting into a hierachy (nested set model)
View Single Post
#
3
(
permalink
)
10-29-09, 16:40
blindman
World Class Flame Warrior
Join Date: Jun 2003
Location: Ohio
Posts: 11,556
Basically, you will increment the right node of your parent node by 2 (along with all subsequent nodes of course), and then set the new child's left node to the parents old right node, and the child's right node to 1 higher than that.
__________________
If it's not practically useful, then it's practically useless.
blindman
www.chess.com:
"sqlblindman"
blindman
View Public Profile
Visit blindman's homepage!
Find all posts by blindman