Which structure in MySQL db for a cat sub sub situation
For one of my new projects I have to create a category page with head category, sub category and sub sub categorie. for example;
- Internet
- Internet > Developing
- internet > Developing > Mobile apps
In this categories you can find websites about these things. I have to give every website the id of the category? what do I have to do if I want to show all these websites开发者_开发技巧 related to 'Internet > developing' at 'Internet' (the head category?)
Thanks in advice.
Regards, Nicky
This is typical situation where the Nested Sets model is very useful
In dev.mysql there was a guide to work with hierachical daat :(
I haven't try this but I just got it http://explainextended.com/2009/03/17/hierarchical-queries-in-mysql/
Also, if you look for "hierachical data" mysql, you will get a lot of options to do what you need.
精彩评论