Solved

load nested categories from database

Posted on 2010-11-26
1
320 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

929 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

8 Experts available now in Live!

Get 1:1 Help Now