Category Tree (Ulimited Sub Categories) |
[eluser]dmorin[/eluser]
Check out: http://dev.mysql.com/tech-resources/arti...-data.html. It's not really mysql specific so don't worry if you're using something else. Basically, there are two main kinds of trees, Adjacency List Model and Nested Set Model. Adjacency is easier to setup and manage but you can't easily query for an entire branch without first knowing the max number of levels. Nested Set is a bit more complex when you're first starting, but ends up being a bit more powerful in that you can return a single branch (or more) with a single query regardless of how many levels it has. |
Messages In This Thread |
Category Tree (Ulimited Sub Categories) - by El Forum - 05-06-2010, 08:41 AM
Category Tree (Ulimited Sub Categories) - by El Forum - 05-06-2010, 09:26 AM
Category Tree (Ulimited Sub Categories) - by El Forum - 05-06-2010, 09:32 AM
Category Tree (Ulimited Sub Categories) - by El Forum - 05-06-2010, 09:34 AM
|