Page 1 of 1
mysql database related quetion
Posted: Mon Mar 27, 2006 8:23 am
by subhash_garai
I
want to know about 'multilevel category' in mysql database
.Please let me knnow about it.
Posted: Mon Mar 27, 2006 11:49 am
by feyd
What do you define as "multilevel"? Do you mean hierarchical structures?
Posted: Tue Mar 28, 2006 6:18 am
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
Posted: Tue Mar 28, 2006 6:39 am
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.
Posted: Tue Mar 28, 2006 8:18 am
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...
Posted: Tue Mar 28, 2006 9:16 am
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!
Posted: Tue Mar 28, 2006 9:30 am
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
Posted: Tue Mar 28, 2006 9:42 am
by jrd

That was a very good article.