vinsb Posted July 2, 2014 Share Posted July 2, 2014 Hello, New to php&mysql here and need a little help. I want to make category list with sub-categories and sub-sub-categories. The goal is when I load website I will see full list with master(root)categories . Then when I click some categories should load sub-category and if I click on sub-category should load sub-sub-category. Something like this: Computers -> Motherboards -> Model 1 -> Model 2 -> etc. Monitors -> Model 1 -> Model 2 As you can see max level of sub-category will be 2+root. Here is the perfect example what I want to do http://3docean.net/category I don't understand(know) also how exactly will look my database table? How to store categories and sub-categories. I don't want someone to write full code etc as I want to learn it but will be great if you guys can show me some good tutorial how to make it mostly database structure. Thank you in advance! p.s. Sorry for my English! Quote Link to comment https://forums.phpfreaks.com/topic/289368-categories-with-subcategories-with-phpmysql/ Share on other sites More sharing options...
jazzman1 Posted July 2, 2014 Share Posted July 2, 2014 Here's a very good example how to manage/structure a hierarchical data in MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/289368-categories-with-subcategories-with-phpmysql/#findComment-1483514 Share on other sites More sharing options...
vinsb Posted July 2, 2014 Author Share Posted July 2, 2014 (edited) Here's a very good example how to manage/structure a hierarchical data in MySQL. Seems good tut but have one question how exactly I can make like in the link wich I show. When is clicked category only then to show sub-category not all at once. Is it possible with php or I need to use other technique? Now I have full list of categories and sub/sub-sub-category. Edited July 2, 2014 by vinsb Quote Link to comment https://forums.phpfreaks.com/topic/289368-categories-with-subcategories-with-phpmysql/#findComment-1483516 Share on other sites More sharing options...
jazzman1 Posted July 2, 2014 Share Posted July 2, 2014 In the link you've posted above is used javascript/ajax/php/css/database technics. You need to create some script by yourself, then you should post your specific question(s) in the forum in case you faced problems, if you are not a programmer I recommend using Google to find some tuts on the web. Quote Link to comment https://forums.phpfreaks.com/topic/289368-categories-with-subcategories-with-phpmysql/#findComment-1483522 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.