Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2007, 12:37 AM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multilevel unlimited subcategory ?

Hi !!

I want to create multilevel category. The depth of subcategory is not limited. Thats means subcategory may be 2,3, and so on

My question is that what type of mysql database structure should i create ?

I have created following type structure

(1) Id - Integer
(2) Categoryname - Varchar
(3) parentid - Integer

Parentid will store id of parent category. If category is main category then its parentid will be ZERO.

I think this structure is correct. But i don't know that how should i display this all category.

Can you help me about what type of php loop programming i have to use?

Kindly just give me php loop programming which can display all category like this


Computer
    Hardware
        Model
        Sterlite company
            D-link company
    Networkcard
            D-link company
    Software
        php
    Asp.net
        Books
        Orelly
        Wrox
                   pdf format download
           Word Format download
Technology
   A-company
   B-company

I would like if anybody can help me regarding this.














Similar Threads
Thread Thread Starter Forum Replies Last Post
Multilevel subtotal of columns yogeshyl SQL Language 1 July 15th, 2008 02:12 PM
Multilevel Grouping with XSLT 2.0 rzegwaard XSLT 2 January 9th, 2008 04:13 PM
What about subcategory option in articles? krainov BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 September 19th, 2007 06:45 AM
Unlimited scrolling dartcoach VB How-To 3 January 19th, 2006 12:15 AM
MultiLevel PHP babaloui PHP Databases 10 August 1st, 2004 02:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.