Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:21

HELP! submenu of a submenu from mysql database


Poster: mengle123
Dated: Wednesday February 27 2008 - 23:21:19 GMT

Hi,

I have successfully created a dynamic image-based horizontal menu pulling a list of submenu items (categories) from a mysql database on my php page. The problem is, now I need to pull out a new subset of menu items (pages) related to each category listing.

Ex:

(MENU IMAGE)
submenu item (category)
submenu item (category)
submenu item (category) ------- submenu item (page) (*repeating list of subitems(pages) that apply to category)
submenu item (category)
submenu item (category)



I have the category section pulling down out of the database no problem. The problem is how do I get the related submenu items (pages) to pull out from each category? The pages are stored in a separate table in the database and related to the category table by ID number.

Working in php/MySQL in Dreamweaver CS3 on mac os x Leopard

below is the brief bit of code I have so far on the menu structure.

//To get the recordset//
mysql_select_db($database_cppdc, $cppdc);
$query_Recordset1 = "SELECT * FROM category WHERE category_section = 'Cumberland Plateau Planning District Commission' ORDER BY ID_category ASC";
$Recordset1 = mysql_query($query_Recordset1, $cppdc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

//Menu Structure//
<!-- QuickMenu Structure [Menu 0] -->
<ul id="qm0" class="qmmc">

<li><a class="qmparent" href="javascript:void(0)"><img class="qm-is qm-ia" src="images/button_cppdc.jpg" width="333" height="45"></a>

<ul>
<?php do { ?>
<li><a href="javascript:void(0);"><?php echo $row_Recordset1['category_category'];?></a></li>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<ul>
<li><a href="javascript:void(0);">item 2</a></li>
</ul></li>
</ul></li>

//item 2 is where the submenu would be a recordset return that contains the pages related to each category row. How do I structure that?

Re: HELP! submenu of a submenu from mysql database


Poster: Ruth
Dated: Monday March 3 2008 - 6:13:14 GMT

Hi,

I think you are going to have to contact Milonic direct on this issue.

Ruth