Jump to content

Forum Hint


Solar

Recommended Posts

Lets say I have a simple table for Categories;

fidforumdesccat

1General Forumdesc here1

2Help Forumdesc here2

3Console Forumdesc here3

 

 

 

Hello! I think I need some creative juice to start my flow and am thankful for any suggestions.

 

I am looking into some advice on how to code in "Category" wise.

 

Lets say if I have forums like this;

 

General Forum

General

Talk about anything in general to NewbWorld.

 

Suggestions

Have any ideas to give to NewbWorld?

 

Anything Goes

Talk about anything you want!

 

Help Forum

 

HTML Help

If you are having problems with HTML coding post here!

 

PHP Help

If you are having problems with PHP coding post here!

 

Instead of me manually coding each Category (General Forum, Help Forum, Console Forum, etc)... I want to be able to have the following coded like so;

 

List Category

---Forum Sub Category

---Forum Sub Category

---Forum Sub Category

 

List Category 2

---Forum Sub Category

---Forum Sub Category

---Forum Sub Category

 

Right now; I've been coding the "List Category" manually to show "Sub Forums". I would like to know how to do this without manual anymore. I would love to start coding an admin/moderator panel soon.

 

Any help is much appreciated and thankyou for your time!

Link to comment
Share on other sites

Oooh, Sorry about that. yes. The "Cat" column my first post is the main Categories.

 

My Sub Forums database has a cat column as well. So the forums showed in the main Category.

 

But you answering: I believe I have the idea.

 

Keep Main Categories and Sub Categories all in the same database? Is that a good idea to do?

I think that is an easy route to take.

 

If not; any suggestions?

Link to comment
Share on other sites

That's up to you. If you want a tree that goes deeper than 2 levels, you probably want a single table.

 

Also, if both parent and subcategories are going to reference similar data, it will be easier to use a single table.

 

For example, if your parent categories will contain forum posts and you have two different tables, you will have a VERY hard time referencing posts to a category, because some parent and sub categories will have the same IDs

 

Does this make sense? The advantage of using one table is you KNOW that each category, sub or parent, will have it's own unique ID

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.