Page 1 of 1

Hierarchical categories structure my-sql and PHP

Posted: Thu Mar 19, 2009 8:41 am
by bharat123
Hello Everyone

1) I need to store in My SQL database a hierarchical categories structure that allows
for unlimited 10 level depth.

The example table structure
Categories
----------
ID (INT)
ParentID (INT)
Name (VARCHAR(255))

We are write the query the hierarchy but some sql error, please guide me how the write hierarchy level query in PHP - mysql
if any one example guide me.

Thanks

Re: Hierarchical categories structure my-sql and PHP

Posted: Thu Mar 19, 2009 9:03 am
by VladSun

Re: Hierarchical categories structure my-sql and PHP

Posted: Thu Mar 19, 2009 9:28 pm
by rcastera
Hey,

There's also a good tutorial on here http://www.sitepoint.com/article/hierar ... -database/