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 6 of 6
  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    M'kay, starting to learn MySQL. What's wrong with this? The first query runs fine, the second doesn't:
    Code:
    CREATE TABLE users
    (
        id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        name TINYTEXT NOT NULL,
        passhash VARCHAR(255) NULL,
        subids TEXT NULL
    );
    
    CREATE TABLE categories
    (
        id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        name TEXT NOT NULL,
        desc TEXT NULL,
        createdate TIMESTAMP(14) NOT NULL
    );
    You have an error in your SQL syntax near 'desc TEXT NULL,
    createdate TIMESTAMP(14) NOT NULL
    )' at line 5
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    Guest
    You have a field called desc in the second one...desc is a reserved word used in the ORDER BY clause. Call it something else...

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Bummer, so much more typing...
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Cheeky monkeh, it worked

    BTW my project just got approved for using PHP and MySQL, so I'll be here a bit
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Guest
    I never lie

  7. #6
    Senior Member ubunreal's Avatar
    Join Date
    Apr 2002
    Location
    Brisbane
    Posts
    263
    Member #
    62
    Originally posted by filburt1
    BTW my project just got approved for using PHP and MySQL, so I'll be here a bit
    damn straight u will lol


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 03:35 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com