how to retrive a category and all it's child in tree structure same as all ecommerce sites ?
I have a table called categories.i stored data into it in such a manner if the category parent_id is 0 then it is the most parent category if category parent id is not 0 then obviously it is the child of anyone ...Means to say that i store the data into tree structure each category can be subcategory or may be sub sub category .Now i want to show them in navigation bar at frontend but i am not getting the actual logic to show them Any one please help me ..My category Model structure is givenbelow: