Solved

load nested categories from database

Posted on 2010-11-26
1
328 Views
Last Modified: 2012-05-10
i have a list of 495 categories which are nested up to 4 levels., example

main category
         |_sub categoey 1.0
                      |_sub categoey 1.0.0
                                     |_sub categoey 1.0.0.0

now if i am thinking of making a tree menu, so what do u guys suggest. shall i make a function which recursively makes list every time a new page is loaded or i just make a function in admin area so that when ever i wanna update category, i just click on button and it writes in file .. say menu.php and it gets stored in regular <ul><li> format so that continuous database read can be avoided.

if there is a better way to implement this, plz suggest so. also i would like ur suggestions about best recursive function to generate category list.

thanks a lot
0
Comment
Question by:nandananushil1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34219005
check this article on mysql site, it's very complete about managing/querying hierarchical data:
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question