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.
I'm trying to program my own board/forum
Moderator: General Moderators
-
Arvid_Falk
- Forum Newbie
- Posts: 3
- Joined: Wed Jul 26, 2006 8:13 am
-
Arvid_Falk
- Forum Newbie
- Posts: 3
- Joined: Wed Jul 26, 2006 8:13 am
Cheers for that astions - nice to see other designs so I can compare them with my own.
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).Thx. My Database is a bit more light....
-
Arvid_Falk
- Forum Newbie
- Posts: 3
- Joined: Wed Jul 26, 2006 8:13 am
That's what I did.GM wrote:Cheers for that astions - nice to see other designs so I can compare them with my own.
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).Thx. My Database is a bit more light....
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.
[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.
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am