Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MySQL (http://www.go4expert.com/forums/mysql-forum/)
-   -   What is wronge with my sql script =(? (http://www.go4expert.com/forums/wronge-sql-script-t4332/)

tsalexey544 16May2007 14:47

What is wronge with my sql script =(?
 
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;

shabbir 16May2007 16:51

Re: What is wronge with my sql script =(?
 
Can you tell what error you are getting? I think you don't need the comma after line 5. ,

pradeep 16May2007 16:53

Re: What is wronge with my sql script =(?
 
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 16May2007 17:06

Re: What is wronge with my sql script =(?
 
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


All times are GMT +5.5. The time now is 08:00.