Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

58 users online



Category System

Category System

Currently viewing this thread: 1 (0 members and 1 guests)


colincameron

colincameron

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

SimpleRules

SimpleRules

Test
Status: Offline!

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.

colincameron

colincameron

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?

Phil

Phil

with Mr. Jones
Status: Offline!

http://www.aesthetic-theory.com/learn.php?mptt

___________________

http://www.philbrodeur.com - Expert PHP Development and Tutorials

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0075 seconds.