Hello,
Iam srinivaasan, I am a newbie to query. I have a small problem to solve. First of I have a table named [MENUS]
with its fields as (menu_id, menu_parent, menu_title, menu_order).
menu_id : is an unique ID and primary key
menu_parent: is an ID of the parent menu.
menu_title: is the name of the menu.
menu_order: is the order in which the menu is displayed.
For example: I have menus in my site saying. "HOME PROGRAMMING GRAPHICS AUTHORING" etc
Assume that the above menus have the submenus like
for PROGRAMMING -> VISUAL BASIC, PHP, ASP, etc.,
and for GRAPHICS -> PHOTOSHOP, FLASH, etc,.
AUTHORING -> PRIEMERE, etc.,
Can anyone pls help me to solve the query by extracting these menus and arrange it on my site dynamically using a single query from the given table.
Thanks regards
Srinivaasan.
feyd | help others help you, use a better thread subject instead of "[HELP] Pls, help!"
performing queries
Moderator: General Moderators
- srinivaasan
- Forum Newbie
- Posts: 12
- Joined: Mon Aug 15, 2005 6:03 am
- Contact:
- srinivaasan
- Forum Newbie
- Posts: 12
- Joined: Mon Aug 15, 2005 6:03 am
- Contact:
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
You may want to try a modified preorder tree traversal algorithm if you want your program to run faster: PHP is not designed to be a recursive language like Lisp.
- srinivaasan
- Forum Newbie
- Posts: 12
- Joined: Mon Aug 15, 2005 6:03 am
- Contact: