What is wronge with my sql script =(?

tsalexey544's Avatar, Join Date: Nov 2006
Go4Expert Member
What is wronge with my sql script
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;
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Can you tell what error you are getting? I think you don't need the comma after line 5. ,
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Use bacticks instead of single quotes for field names and table names!

Code: SQL
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;
tsalexey544's Avatar, Join Date: Nov 2006
Go4Expert Member
Quote:
Originally Posted by pradeep
Use bacticks instead of single quotes for field names and table names!

Code: SQL
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;

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