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!


Results 1 to 5 of 5

Thread: MYSQL INSTALL

  1. #1
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default MYSQL INSTALL

    hello im learning mysql and i want to know how would i make this into install.php so u dont have to manually install

    CREATE TABLE `uploads` (
    `id` int(10) unsigned NOT NULL auto_increment,
    `whenuploaded` datetime NOT NULL default '0000-00-00 00:00:00',
    `ipaddress` varchar(15) NOT NULL default 'unknown',
    `imageloc` varchar(255) NOT NULL default 'unknown',
    `imagesize` int(10) unsigned default NULL,
    `imagetype` varchar(30) default NULL,
    PRIMARY KEY (`id`)
    ) TYPE=MyISAM;
    what would be install.php

    Moved by Agesilaus (Forum Moderator) from Designing and Development: Please post in the correct forum next time.
    Last edited by Agesilaus; 05-01-2008 at 11:32 PM.
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  2. #2
    Join Date
    Nov 2007
    Posts
    753
    Tokens
    0

    Default

    just add some code that connects to a database and then make that a quiery..
    Publishing free website designs, watch this space!
    Total number of designs published: 0
    Current work in progress: Landscape Design


  3. #3
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Do it in phpMyAdmin and then click on the bit that says "Create PHP code"

  4. #4
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    ty blob will do
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

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

    Latest Awards:

    Default

    Or...

    PHP Code:
    <?
    include 'config.php'// include some kind of connection

    $install mysql_query("CREATE TABLE `uploads` (
    `id` int(10) unsigned NOT NULL auto_increment,
    `whenuploaded` datetime NOT NULL default '0000-00-00 00:00:00',
    `ipaddress` varchar(15) NOT NULL default 'unknown',
    `imageloc` varchar(255) NOT NULL default 'unknown',
    `imagesize` int(10) unsigned default NULL,
    `imagetype` varchar(30) default NULL,
    PRIMARY KEY (`id`)
    ) TYPE=MyISAM;"
    )  or die("Error: " mysql_error());;
    echo 
    "Installed...";
    ?>
    Remember, make a file called config.php and put a connection, or just connect on that page...

Posting Permissions

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