+ Post New Thread
Results 1 to 4 of 4
Coding Thread, SQL Code in Coding and Web Development; CREATE TABLE confirmations ( id int(11) NOT NULL default '0', user_id int(11) NOT NULL default '0', check char(32) default NULL ...
  1. #1
    wesleyw's Avatar
    Join Date
    Dec 2005
    Location
    Walsall
    Posts
    2,141
    Blog Entries
    1
    Thank Post
    216
    Thanked 49 Times in 43 Posts
    Rep Power
    28

    SQL Code

    CREATE TABLE confirmations (
    id int(11) NOT NULL default '0',
    user_id int(11) NOT NULL default '0',
    check char(32) default NULL
    );


    I'm creating the following table but I get Error 1064 when trying to run it what have I done wrong?


    Wes

  2. IDG Tech News
  3. #2
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,230
    Thank Post
    10
    Thanked 443 Times in 387 Posts
    Rep Power
    101
    "check" is a reserved word, use another name for the column.

  4. #3
    mark80's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    197
    Thank Post
    11
    Thanked 7 Times in 6 Posts
    Rep Power
    14
    A 1064 error according to google says that a reserve word has been used

    MySQL :: MySQL 5.0 Reference Manual :: 8.3 Reserved Words

    Mark

  5. #4
    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,737
    Blog Entries
    1
    Thank Post
    107
    Thanked 542 Times in 476 Posts
    Rep Power
    134
    Code:
     CREATE TABLE `confirmations` (
    `id` INT( 11 ) NOT NULL DEFAULT '0',
    `user_id` INT( 11 ) NOT NULL DEFAULT '0',
    `check` CHAR( 32 ) NULL DEFAULT NULL
    ) ENGINE = MYISAM

SHARE:
+ Post New Thread

Similar Threads

  1. Dress Code
    By tomscaper in forum General Chat
    Replies: 137
    Last Post: 27th February 2009, 03:19 PM
  2. Code Editor?
    By Dodgex1 in forum Web Development
    Replies: 7
    Last Post: 29th February 2008, 09:32 PM
  3. Are you a Code Monkey?
    By GrumbleDook in forum Jokes/Interweb Things
    Replies: 1
    Last Post: 21st December 2006, 09:58 AM
  4. code room
    By russdev in forum Jokes/Interweb Things
    Replies: 2
    Last Post: 2nd April 2006, 12:37 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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