SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Norway
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    menu/mysql-query

    Hi!

    I want to make different mysql-queries, based on what level the user chooses in the menu..

    How can i solve this?

    I have some problems designing the menu as well if anyone want to help me out..

    It would help me soooooo much..

  2. #2
    SitePoint Zealot LiamW's Avatar
    Join Date
    Mar 2003
    Location
    Hamilton, Ontario
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use variables in the query assuming the query type is the same. i.e select, insert etc.

    Example.
    You have a link that the menu produces as so
    www.site.com/index.php?somevar=test

    $somevar = $_GET['somevar'];
    $query = "SELECT $somevar FROM table";

    What types of problems are you having with the menu?

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Norway
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you..

    Im trying to make a "nested" menu,with 3-4 layers.And to get the titles in the menu from the database so if i change the database the menu changes as well..

    But i find it difficult..

  4. #4
    SitePoint Zealot LiamW's Avatar
    Join Date
    Mar 2003
    Location
    Hamilton, Ontario
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What type of menu are you trying to make?
    What I mean by that is are you just trying to display text links for the menu or something else?

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Norway
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ill try to explain...I have 6 main Items(top level in menu),each item consists of x subitems.These subitems again have new subitems...and so on

    My intention is when you click an item in the menu you get a listing of every part the item consists of.(the query-question)

    For the main items you will then get a list of all its subitems.For a subitem you will get a list of its subitems..


    Therefore I want all titles in the menu to come straight from the database,if I add an item at one level the menu updates.

    The layout of the menu is not so important but i was thinking of some sort of sliding menu or something.

    Did I answer your question? If not,ask again..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •