Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Cape Town, S Africa
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Forum Structure?

    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?

    TIA.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Offtone.com - In the works...

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    Cape Town, S Africa
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks SYP}{ER!

    Regards, Dodger.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •