View Full Version : Feeding Drill Down Menu from MySQL database

05-09-2010, 04:43 PM
1) Script Title: Drill Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/drilldownmenu.htm

3) Describe problem:

I want to have the Drill Down menu gets its elements from a database, I am using php and MySQL and the table (categories) looks like this :


I understand the logic of the hierarchy but I can't figure out how I can extract these information in a way I could put it inside the Drill Down Menu !

I found the recursive method (with LEFT JOINs) and the nested method which I barely understood and again I couldn't apply it to the Drill Down Menu.

Normally, each parent should be inside a
<li> tag and if it has childs, they should be inside the same
<li> but also inside an
<ul>tag, which I believe that's Drill Down Menu structure !

Some people says I should do a "query inside a loop", how is that going to be with Drill Down Menu Structure ?

I would be more than gratefull if you could give me the extact syntax of the loop or another workaround if there is.

Thanks a lot for your hard work,