What is wronge with my sql script =(?

Discussion in 'MySQL' started by tsalexey544, May 16, 2007.

  1. tsalexey544

    tsalexey544 New Member

    Joined:
    Nov 18, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    What is wronge with my sql script :confused:
    I get an error on line 5..... Please help me.
    thanx for your time.

    CREATE TABLE ' edoobc_ user' (
    'id' int (10) unsigned NOT NULL auto_increment,
    'username' varchar (20) NOT NULL default '',
    'password' varchar (50) NOT NULL default '',
    'email' varchar (40) NOT NULL default '',
    PRIMARY KEY ('id')
    ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Can you tell what error you are getting? I think you don't need the comma after line 5. ,
     
  3. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Use bacticks instead of single quotes for field names and table names!

    Code:
    CREATE TABLE `edoobc_user` (
    `id` int(10) unsigned NOT NULL auto_increment,
    `username` varchar(20) NOT NULL default '',
    `password` varchar(50) NOT NULL default '',
    `email` varchar(40) NOT NULL default '',
    PRIMARY KEY(`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
    
     
  4. tsalexey544

    tsalexey544 New Member

    Joined:
    Nov 18, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0

    NOW IT IS WORKIG!!!!!! ;)

    I changed it to this:

    CREATE TABLE edoobc_user (
    id int (10) unsigned NOT NULL auto_increment,
    username varchar (20) NOT NULL default '',
    password varchar (50) NOT NULL default '',
    email varchar (40) NOT NULL default '',
    PRIMARY KEY (id))
    ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice