Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    PHP Code:
        $result1 mysql_query('
            CREATE TABLE users
            (
                id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
                name TINYTEXT NOT NULL,
                passhash VARCHAR(255) NULL,
                subids TEXT NULL
            )'
    );
        
    $result2 mysql_query('
            CREATE TABLE categories
            (
                id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
                name TEXT NOT NULL,
                description TEXT NULL,
                createdate TIMESTAMP(14) NOT NULL
            )'
    );
        
    $result3 mysql_query('
            CREATE TABLE messages
            (
                id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
                catid INT UNSIGNED NOT NULL,
                subject TEXT NOT NULL,
                date TIMESTAMP(14) NOT NULL
            )'
    );
        if (!
    $result || !$result2 || !$result3)
        {
            
    echoerror('Error while executing a query to set up database structure');
        } 
    echoerror() was called. But the tables are created and I can see their structure properly in pma.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    Guest
    Because you've left the 1 off the end of the first result in the If statement, since $result will always be false it's triggering the error...[mrt]you fool![/mrt]

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    [drnick]Inflammable means flammable?[/drnick]

    It works now
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Guest
    apologise to mysql this instant!

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    It stole my girlfriend
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com