Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
All requests | > | Tree structure left right node get | > | Request new recommendation | > | Featured requests | > | No recommendations | ||
by prabha - 10 days ago (2016-02-04) left right node tree structure
+1 | I need category insert with parent id, left node, right node. I already have the parent id, but I can't get the left right node dynamically. |
1. by Dave Smith - 7 days ago (2016-02-06) Reply
You would have a category id, left node parent and right node parent. Suppose your parent category has an id of 100, the left child would relate to it with a left node parent of 100 and the right child would have a right node parent of 100. You would have 2 unique keys containing category id -> left node parent and category id -> right node parent. You would not have a parent id field since that creates a one to many relationship and you are looking for a one to one for each left and right node.
Recommend package | |
|