Solved

load nested categories from database

Posted on 2010-11-26
1
317 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
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now