forum making

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

forum making

Post by method_man »

i am making a forum and i am wondering what fields i would need for the table in my database.
would i just need:
users
password
posts?
or would i need anything else

thanks,

matt
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I did

users
id
name
password
email
access

posts
id
threadid
text

thread
id
title
category_id
status (open, locked)

category
id
title
description
access

Thats fairly simple
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

thanks :D
also,
whats "access" under user and category?
and
whats the difference between title and id?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I use access to block users from posting in categories they arn't supposed to..
1 Thing I forgot to add in a permission table. Its to allow you to distinguish admins from normal users.. or even banned users.

title - the thread's title (text)
id - the thread's id (int)(auto incremented)
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

i still dont get it lol
what about date posted?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

What I suggest doing is firstly spending a good while thinking about EVERYTHING you want to have included in the forum... (account types, show email, msn yahoo aim etc, different boards, ip tracking, etc etc etc). Then you'll need to decide exactly what needs storing to do that. Finally you'll have to normailize that to at least 3NF (according to Codd's Rules -> Google it).

If you read up on database normalization this task will not seem quite so overwhelming ;)

You're gonna end up with quite a lot of tables if you're looking for an efficient and highly functional forum...

I'd *possibly* help you set the database up (not in the next few days mind-you) but then you'll need to understand how to join everything back up when you retreive the data....
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Of course, you could always download an already programmed forum, install it, and take a look at their tables for some ideas.
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

where would i download a forum?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

method_man wrote:where would i download a forum?
Well your on phpBB right now... it's free and open source and available at http://www.phpbb.com/ (linked to in the page footer) ;)

Other common ones are Invision Board and vBulletin...
Post Reply