| Posted in Website Programming » PHP - Sunday 19th August 2007 at 9:09PM | |
|
cmellor Joined August 2007 |
Hey, I have a question regarding how this forum was coded. I hope to make my own forum for an upcoming project of mine, I just want to see if I can do it :) __________________________________ |
- Subscribe to this
- Search this thread
- Rate this thread
Question Regarding This Forum
Replies (2)
| Replied - Tuesday 4th September 2007 at 1:59PM [Post Link] | |
|
Will Joined October 2005 |
I just have one table called forum_categories, and one called forum_forums. That's the proper RDBMS way of coding, really.
__________________________________ |
| Replied - Tuesday 4th September 2007 at 6:52PM [Post Link] | |
|
Tubby Joined July 2007 |
On one of my sites I do it like Will, forumcategories and forums, two tables. I normally have three tables - forumthreads, forumreplies and forumcategories.
The forumcategories table has a unique ID for each, and they're added with say an ID of 1, name of General Chat, and another row is added with the ID of 2, and the name of Help. The forumthreads table has a field "category" with the category number, for example 1 if the thread was in general chat. The name in the categories is just for display, the ID is what is used to check. Then it's simply a query of something like indeed. __________________________________ |