Database structure for categories and subcategories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sharifphp
    New Member
    • Jun 2012
    • 6

    Database structure for categories and subcategories

    Hy i am a new learner here. i start to create site

    where have 3 category like(man;women; kids)and sub-category
    (man shirt ;man woven;man sweater) same also women and kids

    how way i star my database and table and which would be my sql query ?? can any one help me plz
  • ucu13
    New Member
    • May 2012
    • 14

    #2
    maybe if you can give more details. ex for men you gave some details.you can try this: create a database "store" or whatever, then create a table category that contains man,women,kids, and the id. then create the second table with materials. with columns: id,id_category, material;

    for example:

    store: category: id, category
    1 man
    2 women

    material: id, id_category, materials
    1 2 woven
    2 2 shirt
    3 1 shirt
    if you cant give me more details, i cannot help more

    Comment

    • sharifphp
      New Member
      • Jun 2012
      • 6

      #3
      Thanx you

      it would help me little more.

      http://www.phpwebcommerce.com/// this address you give some clear concept what i want to do?

      thanks you again.

      Comment

      • sharifphp
        New Member
        • Jun 2012
        • 6

        #4
        Hellow dear ;
        how query i submit to pss data in various link page
        from "material" table.

        THANKS

        Comment

        • kavinhuh
          New Member
          • Feb 2012
          • 13

          #5
          please mention what is pss

          Comment

          • sharifphp
            New Member
            • Jun 2012
            • 6

            #6
            Thanks kavinhuh:

            I like to say which query i pass to get data result for my index page and link page

            thanks again

            Comment

            • sharifphp
              New Member
              • Jun 2012
              • 6

              #7
              store: category: id, category
              1 man
              2 women
              material: id, id_category, materials
              1 2 woven
              2 2 shirt
              3 1 shirt
              ***from "material table" how way i got my product view like;
              index page
              1>man shirt<link page>
              2>man sweater<link page>
              3>women shirt<link page>
              2>women sweater<link page>
              3>kids sweater<link page>

              Comment

              • ariful alam
                New Member
                • Jan 2011
                • 185

                #8
                If you are doing this using ASP.net for your site interface, then ASP.net has component named "Menu". This can show like below.

                Man
                --->Shirt
                --->Sweater
                --->Woven
                Woman
                --->Shirt
                --->Sweater
                --->Woven
                Kids
                --->Shirt
                --->Sweater
                --->Woven

                to do this you need to query the followings and link those in code like relationship.

                1. select * from store
                2. select * from material.

                Comment

                • sharifphp
                  New Member
                  • Jun 2012
                  • 6

                  #9
                  THANKS ariful alam BHAI BUT I WORKING IN PHP;MYSQL

                  Comment

                  Working...