Page 1 of 1

I'm trying to program my own board/forum

Posted: Wed Jul 26, 2006 8:16 am
by Arvid_Falk
Hi guys,

I'm currently programing my own board/forum. But unfortunately I'm experiencing trouble while designing the table. All work the fine when I post a topic but I've difficulties when I link messages, post and replies between them.

So my question is basic. How should I desing my table properly.

Thx for you help

Regards,

PS: I'm using PHP/MySQL and I only need the structure of the SQL's tables.

Posted: Wed Jul 26, 2006 8:22 am
by Benjamin
Here is the database structure for phpBB

SQL

Posted: Wed Jul 26, 2006 8:35 am
by Arvid_Falk
astions wrote:Here is the database structure for phpBB

SQL
Thx. My Database is a bit more light....

Posted: Wed Jul 26, 2006 8:38 am
by GM
Cheers for that astions - nice to see other designs so I can compare them with my own.
Thx. My Database is a bit more light....
So just take the users, forums, topics and posts tables, remove the fields you don't want, and from that you should be able to make a pretty much working forum (albeit a very basic one).

Posted: Wed Jul 26, 2006 10:04 am
by Arvid_Falk
GM wrote:Cheers for that astions - nice to see other designs so I can compare them with my own.
Thx. My Database is a bit more light....
So just take the users, forums, topics and posts tables, remove the fields you don't want, and from that you should be able to make a pretty much working forum (albeit a very basic one).
That's what I did.

Posted: Wed Jul 26, 2006 2:02 pm
by alvinphp
Here you go....

[tbl_topic] lists all your topics (key is topic_id)
[tbl_post] lists all your posts (key is post_id, foriegn key is topic_id and user_id)
[tbl_user] lists all your users (key is user_id)

When a person creates a new topic you will insert a record in tbl_topic and then their initial posts in tbl_post. When someone replies to the topic you just insert a record into tbl_post.

Posted: Wed Jul 26, 2006 2:31 pm
by MrPotatoes
i have 5 tables for my forums that i wrote. the only 'hard' thing about my forums as is, is getting to show the main page. after that the code comes so easilly. 3 files too. less than 400lines of code. although there is no admin just yet lmao! soon enough