View Single Post
Old 12-18-2007, 08:21 PM   #1 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default Having an issue with the forum..

Yea, here we go again ;)

I've come a good bit. I already have a user system that I've built before, that I'm planning on implanting, so I'm mainly concentrating on getting the forum functions right now.

For example, categories, forums in different categories, and threads.

Now I have a question.
My database structure looks like this:
Code:
forums => 
forum_id tinynt(10)
forum_name varchar(25)
forum_desc varchar(255)
forum_parent tinyint(10)
forum_order tinyint(10)
forum_category tinyint(1)

threads =>
thread_id int(10)
thread_name varchar(25)
thread_forumId tinyint(10)
thread_author varchar(25)
thread_sticky tinyint(10)
It's working quite well right now.
I think you understand the basics about the forum table.
If a forum is a category, the row is the value 1, if it's a simple forum it's a 0. If it's a regular forum, the "parent" row is set with the forum_id of the category forum that it's supposed to be under.

The thread table is quite easy aswell.

My question concerns the POSTS in the threads.
Should I store them inside the thread table(?? :S), or should I create a seperate table for the posts, like this?

Code:
posts =>
post_id
post_threadId
post_author
post_time
post_content
??
Tanax is offline  
Reply With Quote