feyd | This topics has been split from here.
Hey,
I was just reading this post cause i am building a similar menu system however i want to allow for multi-dimensional menus..
so far i used php to do recursive processes but i am reading into this "NESTED set model" approach....
Problem is...i don't understand what the heck you guys are saying...
I looked at the articles but im still confused about the left and right columns....
How did they arrive that the values?
how do you apply that formula when adding and updating records?
Ttimvw,
Im tryin to understand your concept but im a bit puzzled...how about a beginners start?
Kendall
Multilevel menus
Moderator: General Moderators
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
Nested Set Model...building database hierarchical-data
Just so you guys no...did a bit of googling and found t his article...its soooo much simpler to understand...timvw wrote:Don't have an example right way... But i can tell you there is a pear package Nested_Sets that does this all for you...So you can simple use that implementation
http://dev.mysql.com/tech-resources/art ... -data.html
Kendall
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
Nested Set Model...building database hierarchical-data
Guys....quick discussion here....
if im building a menu system with several "root" level menus would it be wise to start each root with one and have a nother column like say a "group id" that will tie al related sub menus to the root?
thus
if im building a menu system with several "root" level menus would it be wise to start each root with one and have a nother column like say a "group id" that will tie al related sub menus to the root?
thus
Code: Select all
MenuID | Name | lft | rght | group
1 | name 1 |1 | 6 | 1
2 | name 2 |1 | 4 | 2
3 | name 3|1|2|3
4 | sub 1 |2|3|1
5 | sub 2|4|5|1
6 | sub 3|2|3|2