How to create category?

Discussion in 'PHP' started by Om ji Kesharwani, Oct 31, 2009.

  1. #1
    I want to create multiple category with undefined depth.Please suggest me any tutorial or block of code which can help me.
     
    Om ji Kesharwani, Oct 31, 2009 IP
  2. innovatewebs

    innovatewebs Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    Hi just use the following
    catid
    catname
    parentid (this will point to catid)
     
    innovatewebs, Oct 31, 2009 IP
  3. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for your post, i know this logic but how to implement it by recursive method?
     
    Om ji Kesharwani, Oct 31, 2009 IP
  4. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #4
    To get theory try google for
    'nested sets php'
    'materialized path php'
    As far as I know these can have unlimited nested categories.
     
    AsHinE, Nov 2, 2009 IP
  5. Hannaspice

    Hannaspice Active Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    hi ul, I have the same problem.
    Multiple categories: what you mean parentid?
    catid: INT
    catname: vchar
    parentid: ???
     
    Hannaspice, Nov 9, 2009 IP