SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile setting up a forum

    How would you setup the database in mySQL for a forum?

    I havent really thought about the tables yet, but so far i just created this very quickly

    PHP Code:
    $query="CREATE TABLE IF NOT EXISTS $users (
                    id INT(4)     UNSIGNED NOT NULL AUTO_INCREMENT,
                    username     VARCHAR(10) DEFAULT 'anonymous' NOT NULL,
                    userpass     VARCHAR(10) DEFAULT 'anonymous' NOT NULL,
                    secret_question    VARCHAR(10) DEFAULT 'anonymous' NOT NULL,
                    secret_answer    VARCHAR(10) DEFAULT 'anonymous' NOT NULL,
                    useremail     VARCHAR(40),
                    homepage     VARCHAR(50),
                    member_Referrer VARCHAR(15),
                    d_threadview    INT,
                    d_postThreads    INT,
                    start_week    VARCHAR(10),
                    timeoffset    INT,
                    level_rating    INT,
                    PRIMARY KEY (id)
                    )"

    and a few other tables called management, replies and topics.


    How would you setup a forum like this?
    As im in need of idea's

    Thanks

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could always look at an existing script to see how they have done it, or if you have a more specific question we may be able to give you more advice

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just look at the scripts of phpBB

    Or, just use that forum altogether, unless you are doing this just to practice your php and MySQL skills.

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats what i'm doing but at least i can see how to get started


Bookmarks

Posting Permissions

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