mysql - PHP Zend framework - Many layer menu -


in application, want make dynamic multi layer menu this

toy1

==>sub toy1-a

==>sub toy1-b

toy2

==>sub toy2-a

==>sub toy2-b

toy3

==sub toy3-a

i have created 2 table in database called parent-menu contain toy1,toy2,toy3 , sub-menu contain sub toy1-a, sub toy1-b , father belongs. don't know how retrieve database or algorithm make this. have solution ?

i can recommend use 1 table, make program eaisy.

take 3 field *menu_id* , *menu_text* , *parent_id* top menu take parent id 1. following work,

retrieve data table.

and use recursive function place menu.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -