Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 1064, but it looks right to me?

Status
Not open for further replies.

nedstar1

IS-IT--Management
Mar 2, 2001
127
US
Hi Folks.

I'm using phpMyAdmin to build a new db for a site I'm fiddling with. Had it set up at a friend's house, he dumped the MySQL db into a text file. When I go to load it through phpMyAdmin, I'm getting the following:

#1064 - You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ' at line 16

for this code:

CREATE TABLE `tbl_users` (
`userID` int(11) NOT NULL auto_increment,
`firstName` varchar(50) default NULL,
`lastName` varchar(50) default NULL,
`username` varchar(50) default NULL,
`pwd` varchar(50) default NULL,
`address1` varchar(50) default NULL,
`address2` varchar(50) default NULL,
`city` varchar(30) default NULL,
`state` varchar(30) default NULL,
`zip_postal` varchar(15) default NULL,
`telnum` varchar(15) NOT NULL default '',
`order_complete` char(1) default '0',
PRIMARY KEY (`userID`),
KEY `userID` (`userID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

The error is on the last line, but it looks right to me . . .

Any thoughts?
 
Hi DotNetGnat,

Turns out my webhost is running an older version. I changed it to:

CREATE TABLE `tbl_users` (
`userID` int(11) NOT NULL auto_increment,
`firstName` varchar(50) default NULL,
`lastName` varchar(50) default NULL,
`username` varchar(50) default NULL,
`pwd` varchar(50) default NULL,
`address1` varchar(50) default NULL,
`address2` varchar(50) default NULL,
`city` varchar(30) default NULL,
`state` varchar(30) default NULL,
`zip_postal` varchar(15) default NULL,
`telnum` varchar(15) NOT NULL default '',
`order_complete` char(1) default '0',
PRIMARY KEY (`userID`),
KEY `userID` (`userID`)
) TYPE=MyISAM ;

and it worked perfectly.

Why the reference to TIMESTAMP? Or were you just pointing me to the manual? ;)

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top