mysql database related quetion

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
subhash_garai
Forum Newbie
Posts: 12
Joined: Mon Mar 27, 2006 8:09 am

mysql database related quetion

Post by subhash_garai »

I
want to know about 'multilevel category' in mysql database
.Please let me knnow about it.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What do you define as "multilevel"? Do you mean hierarchical structures?
subhash_garai
Forum Newbie
Posts: 12
Joined: Mon Mar 27, 2006 8:09 am

Post by subhash_garai »

yes . can u help me to build such a hierarchy?For example:


1. First Main Service Category
-- a. First Sub Service Category
---- (i) First Sub Category
------ 1. First Description
------ 2. Second Description
---- (ii) Second Sub Category
------ 1. First Description
-- b. Second Sub Service Category
---- (i) First Description
---- (ii) Second Description
2. Second Main Service Category
-- a. First Sub Service Category
---- (i) First Description
-- b. Second Sub Service Category
---- (i) First Description
subhash_garai
Forum Newbie
Posts: 12
Joined: Mon Mar 27, 2006 8:09 am

Post by subhash_garai »

multilevel category in the sense that there are contents which i will have to show in a heirarchical structure. The thing is that i am using database mysql. So i want to know the databasestructure to be built on mysql and the php code to show them on that structure .please help me out.
jrd
Forum Commoner
Posts: 53
Joined: Tue Mar 14, 2006 1:30 am

Post by jrd »

subhash_garai wrote:multilevel category in the sense that there are contents which i will have to show in a heirarchical structure. The thing is that i am using database mysql. So i want to know the databasestructure to be built on mysql and the php code to show them on that structure .please help me out.
You can design your database just about anyway you want and display it just about any way you want with php. Why don't you go try something out and post it in the database section?
1. Paper
-- a. Recycled
---- (i) Size
------ 1. A4
------ 2. A3
---- (ii) Color
------ 1. Red
------ 1. etc..
-- b. Non-recycled
---- (i) Size
---- (ii) Color
2. Glass
-- a. Recycled
---- (i) etc..
-- b. Non-recycled
---- (i) etc...
subhash_garai
Forum Newbie
Posts: 12
Joined: Mon Mar 27, 2006 8:09 am

Post by subhash_garai »

thax a lot for your response.Frankly speaking it has enchanted me.I will surely try out to complete this only with the help of my php.
Still i request u to send me a dummy code which will show me this type of result.
I am feeling so hopeless due to less time!
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

I do it using the methods described in this tutorial!

either The Adjacency List Model or the Modified Preorder Tree Traversal

http://www.sitepoint.com/article/hierar ... a-database
jrd
Forum Commoner
Posts: 53
Joined: Tue Mar 14, 2006 1:30 am

Post by jrd »

:D That was a very good article.
Post Reply