Smart way of handling this

wxdqz

New Member
Ok, I'm making an article engine using PHP/MySQL. It's going pretty well, I just have one question regarding how I should handle article categories.
This is my categories table:
table article_categories(
categoryID tinyint(2) NOT NULL,
categoryName char(255) NOT NULL,
PRIMARY KEY (categoryID),
UNIQUE ID (categoryID)
);
Now I want to have subcategories as well under categories, so I could have a category called programming and then subcategories PHP, Perl, etc.
What would be a smart, optimized way of doing this?
 
Back
Top