Jump to content


Photo

Category system


  • Please log in to reply
2 replies to this topic

#1 mort

mort
  • Members
  • PipPipPip
  • Advanced Member
  • 82 posts

Posted 18 June 2006 - 08:23 PM

Hi all

I need to make a script that will enable me too put my categories as subcategories under other categories

my category table in my DB has the following fields. cat_id, cat_name, parent_id. The parent_id is the cat_id of the category it is in.

my question is, which would be the best way to do it, so it outputs say, the main category, then if a sub category exists, display it, and keep going until one doesnt exist

working on it now and a little stuck on where to start rly

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 18 June 2006 - 08:32 PM

Do you mean you want an infinite amount of sub-categories within sub-categories?

#3 mort

mort
  • Members
  • PipPipPip
  • Advanced Member
  • 82 posts

Posted 18 June 2006 - 09:23 PM

well i dont NEED infinite, but i need more than one level, and knowing how to do it infintley would be handy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users