Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: mySQL with PHP?

  1. #11
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    CREATE TABLE `shoutbox` (

    Tells mysql you want to create a table, and that it should be called 'shoutbox'

    `id` int(11) NOT NULL auto_increment,

    Tells mysql in this table (its between the bracktes) you want to create a field. The first part tells it the fild is named ID the second part is the data type, in this instance, its int or intiger and the lengh of the field is 11. The net part says the value in the table cant be null. null being nothing, in this case the start value will automaticly be 0. Auto incriment means each row gets a unqie number

    `name` text NOT NULL,

    Same. except its a text field, and does auto incriment

    `message` longtext NOT NULL,

    Same again pretty much, except longtext

    `time` text NOT NULL,

    yet again pretty much the same

    PRIMARY KEY (`id`)

    Sets primary key, as id, basicly means its ordered by it by defult

    ) TYPE=MyISAM;

    ends sql add table code, says table type is MyISAM, although in some of the newer mysql relices InnoDB is starting to take over "/

    ps. Theres no php in that, its just the sql
    Just what I wanted thanks! +rep

    So, what parts do you have to have in it, say like you were creating a forum? Also, how do you find out how long things are (like the 11 thing)?
    Last edited by Hitman; 08-09-2006 at 07:12 PM.

  2. #12
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    depends on what you wana put in the field, its realy only useful for varchars most the time alot types will take an unspecifed lengh,

    Plus forums usealy use a minimum of about 10 tables, u have users db, posts db, etc etc,

  3. #13
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Hm, I think I get you. You've been the biggest help, cheers!

    I will leave the thread open, for anybody else who wants to help. Or explain anything.
    Last edited by Hitman; 09-09-2006 at 05:54 AM.

Page 2 of 2 FirstFirst 12

Posting Permissions

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