The majority of forums are now only available as archives, which means posting/editing is disabled.
The Anything and Everything forum is still open.
The Anything and Everything forum is still open.
creating a database
|
|||
|
Rank: ? (8)
Member #: 24204 |
Where's some good tutorials, or someone, who can help me build a database for my forum software I'm wanting to code.
|
||
|
|||
|
|||
|
Rank: Unregistered
|
ask away
|
||
|
|||
|
|||
|
Rank: ? (4827)
Member #: 3416 |
here's the tables i use for my forums:
Code:
currently i have one group, with the title 'general discussions.' this is used for grouping the different forums together on the main page, and if my forums get enough posts that it makes sense to split off some new forums, i'll probably add more groups. forums are assigned to a group by setting gid to the id of the group. threads and posts are counts that are updated whenever someone starts a new thread in that forum or posts a reply in that forum. these are displayed to show how active the forum is. lastpost holds the id of the most recent post in that forum, used to link to that post from the main listing and also get the timestamp of the last post so people know if they should look for new posts in that forum. threads are assigned to forums using fid. instant is when the thread was started. uid is the id of the user who started the thread (or 0 if started by an anonymous user). posts and lastpost work the same as they do in the forums. you can probably figure out what posts is all about from there note that when a thread is started, i create an entry in threads and also an entry in posts containing the text the thread was started with.
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
|||
|
|||
|
Rank: ? (171)
Member #: 11947 |
that one looks good, but depends on what type of databse (mysql, oracle, mssql..., at least for syntax)
just think about what you need and what you want to do, then break it into groups.. a form would have posts and users, at a minimum... under posts you might have: folder, subfolder, ID(PK), date, subject, body, user, parentID. folder and subfolder aren't necessary, but for grouping purposes might come in handy. parentID would be 0 if it is the start of a thread, otherwise the id of the parent (obviously , right) under users you'll have: id(PK), group, name, accesslevel, avatarURI, signature, location, profile... you get the picture.... |
||
|
Please login or register to post a reply.
