![]() |
Menu with only one query?
Hi, i'm dealing with the following issue.
I'm willing to output a menu of two levels. If an item contains a parentId it is a subitem, if not; it is a 'main' item. I want to output this in a nested list. How to do this with only one query? |
Okay, let's clearify with a working example (the ugly way with more than one queries):
PHP Code:
|
Basicly you select all the items from your menu table, and then let php work it out.
Hope it helpes. PHP Code:
|
Thanks abiko, that was what I was looking for. I just couldn't come up with it.
Cheers! |
| All times are GMT. The time now is 05:13 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0