
April 5th, 2005
07:38 PM
Neverside Newbie
Status: Offline!
Category System
Im having some trouble with a category system for database entries. I originally had a columns for cat, subcat1, subcat2
This way each entry could have upto 3 categories, but I dont know how I could query the results for the category foo if it could be in any of the three columns.
Does anyone have any suggestions, im stumped

April 5th, 2005
09:30 PM
What I did was use a basic layout for database like
catid, catname, catdescription, class, parent
So for a root category (not a sub)
it would be like
boarda, Board A, Boring Board, root, ,
and for a sub
boardb, Board B, Beatufil Board, sub, boarda,
That works well for me.

April 6th, 2005
12:14 AM
Neverside Newbie
Status: Offline!
What about having a catid column like this:
catid - 1,5,24,3
Would it be hard to query results if this was like this?

April 6th, 2005
03:01 AM
with Mr. Jones
Status: Offline!
http://www.aesthetic-theory.com/learn.php?mptt
___________________
http://www.philbrodeur.com - Expert PHP Development and Tutorials