Jump to content

dynamic navigation PHP/MySql


Recommended Posts

Hi all,

I hope somebody can help me with the folowing:

I'm trying to create a pulldown-navigation which is build enterily dynamic from a MySql database
.
I've got two tables in MySql, one with the main navigation options, and one with the pulldown options.
The first thing i do is to create a repeat on the first table, which will give me with the main options in my navigation bar. No problem so far.
Now i have to bind the right suboptions to the corresponding main option... and that's where the trouble starts.

In my second MySql table i have a cell with the mainoption-positon which to relate to.
How do i bind this to the right mainoption? Right know i'm using a nested repeat loop inside of the main-loop, but this is probably not the right way to go...
My guess is i should use some kind of 'JOIN'? Unfortunately my MySQL knowledge stops just about there....

Can somebody please point me in the right direction?


thanks grtz, Holly
Link to comment
Share on other sites

UPDATE:
I found another way to solve my problem. I've build my submenu-query according to the pulldown 'id' which is counting from 1 till the number of total main navigation options.

If you have the answer the 'JOIN' way; i'd like to hear that anyway. I think that way is prettier and resource friendlier.


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.