Jump to content

Recommended Posts

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!

 

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 by vinsb

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.  

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.