I need advices for a table structure.
I need to create menus dynamically.
There will be more than 3 menus.
Some of menus will have multi-level structures.
What is the best way to strucure the menu tables?
- All the menus are in one table
- Each table should have one table
- Any other??
Please give me your experience or common practices for dynamically generated menus please.
assuming your menu tree is not very large, the so-called adjacency list would be the simplest option
for top level menus parent_id = 0
see Managing Hierarchical Data in MySQL for further discussion and other options