vividona Posted May 16, 2009 Share Posted May 16, 2009 Hi friends, suppose I have this table values id | name | parent 1 x 0 2 x 1 3 x 2 if parent == 0 it means the x (1) is main category if parent == 1 it means x (2) is parent to the main x if parent == 2 it means x (3) is parent to the parent x and so on how can I insert and fetch this idea in php code Link to comment https://forums.phpfreaks.com/topic/158378-nested-categories-subcategories-and-sub-subcategories/ Share on other sites More sharing options...
Ken2k7 Posted May 16, 2009 Share Posted May 16, 2009 That structure doesn't make sense to me. Which is x(1)? Is it the first x? If so, I don't get it. And why go by name rather than id? Link to comment https://forums.phpfreaks.com/topic/158378-nested-categories-subcategories-and-sub-subcategories/#findComment-835261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.