Submitted by mike8 on Sun, 09/04/2011 - 15:47
I'm trying to set up a simple database for a login script. The problem is the SQL file seems to in error, maybe it was for an older MySQL server software. I was hoping someone could help me fix the SQL, its not very big.
#
# Table structure for table 'members'
#
CREATE TABLE `members` (col_7)
`member_id` int(11) unsigned NOT NULL auto_increment,
`firstname` varchar(100) default NULL,
`lastname` varchar(100) default NULL,
`phone` varchar(100) default NULL,
`email` varchar(100) default NULL,
`login` varchar(100) NOT NULL default '',
`passwd` varchar(32) NOT NULL default '',
PRIMARY KEY (`member_id`)
) TYPE=MyISAM;
#
# Dumping data for table 'members'
#
INSERT INTO `members` (`member_id`, `firstname`, `lastname`, `phone`, `email`, `login`, `passwd`) VALUES("1", "Jatinder", "Thind", "phpsense", "ba018360fc26e0cc2e929b8e071f052d");
I'm not sure what the problem is, except I'm a complete noob with it comes to MySQL Database stuff.
Thanks Michael
Status:
Active
Comments
Submitted by andreychek on Sun, 09/04/2011 - 16:12 Comment #1
You could try using an SQL syntax checker such as "mimer" to look at your SQL syntax. It doesn't know MySQL specifically, but it may be able to point you in the right direction:
http://developer.mimer.se/validator/parser200x/index.tml#parser
I hadn't used "backticks" in my SQL before, and the examples in the MySQL documentation don't show that:
http://dev.mysql.com/doc/refman/5.1/en/create-table.html
That's something that the above parser points out, that it doesn't like those particular characters.
Submitted by JamieCameron on Sun, 09/04/2011 - 21:00 Comment #2
Also ,what is the error you are getting from MySQL when you try to execute these statements?
The
(col_7)
phrase looks odd to me, and should be removed..