View Full Version : Forum Structure?

07-27-2002, 01:34 PM
Hey All,

I'm thinking of writing my own forum software...

I'm just a wondering how many tables in the DB to use?

You would need a forum categories table, a forums table, a posts table and a replies table...

Is it OK to put ALL topic replies in one table?

Or should it be spread out more?


07-27-2002, 02:11 PM
fid= forum id
tid= thread id
pid= post id

You'll need a forums table, threads table, and posts table.

The forums table needs a fid column so it can be referenced.

The threads table needs a fid column AND a tid column so it knows which forum it belongs to, and can be referenced.

The posts table needs a fid colum and a tid column so it knows which forum and which thread it belongs to. It also needs a pid column so you can reference each post.

Hopefully that's not too confusing. It's pretty straight forward, really.

07-27-2002, 02:22 PM
Thanks SYP}{ER!

Regards, Dodger.