Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Unanswered: unlimited sub category levels

    Hi there,

    I have a situation where I would like to create unlimited categories, but going unlimited levels deep.... meaning something like:

    level1 cat
    level2 cat
    level3 cat

    Is this possible? I can't seem to wrap my head around how to structure the database. If I didn't need unlimited levels, I would just create a table for each category and link it with a parent id type thing.

    Is this possible? Or should I just throw in the towel and decide how many levels deep to allow for, and create a table for each one?

    Thanks in advance.


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    yeah its possible

    do a google on data hierarchies. I know theres some good stuff by Rudy Limeback (R937) with some SQL to retrieve upto 5 levels in one query hit

    but dont' give up and try to create a table for each level.. that way the dark side lies
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    thanks healdem, it's here --> Categories and Subcategories | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts