+ 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
    Kingswinford
    Posts
    2,218
    Thank Post
    230
    Thanked 50 Times in 44 Posts
    Blog Entries
    1
    Rep Power
    31

    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. #2
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,505
    Thank Post
    10
    Thanked 508 Times in 445 Posts
    Rep Power
    116
    "check" is a reserved word, use another name for the column.

  3. #3
    mark80's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    218
    Thank Post
    27
    Thanked 12 Times in 10 Posts
    Rep Power
    18
    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

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227
    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, 04:19 PM
  2. Code Editor?
    By Dodgex1 in forum Web Development
    Replies: 7
    Last Post: 29th February 2008, 10:32 PM
  3. Are you a Code Monkey?
    By GrumbleDook in forum Jokes/Interweb Things
    Replies: 1
    Last Post: 21st December 2006, 10:58 AM
  4. code room
    By russdev in forum Jokes/Interweb Things
    Replies: 2
    Last Post: 2nd April 2006, 01: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
  •