MySQL Forums
Forum List  »  Newbie

Error code #1064 trying to import SQL file.
Posted by: Yan M
Date: July 02, 2005 09:18PM

Hi all,

Im a novice at SQL and PHP. Im trying to import an SQL query file but get this error:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 28


Here is the code and the last line is line 28:
-----------------------------------------

CREATE TABLE `carts` (

`id` int( 8 ) NOT NULL AUTO_INCREMENT ,
`visitor_id` varchar( 26 ) NOT NULL default '',
`photo_id` varchar( 7 ) NOT NULL default '',
`added` varchar( 14 ) NOT NULL default '',
`ptype` char( 1 ) NOT NULL default '',
`prid` int( 10 ) NOT NULL default '0',
`quantity` int( 10 ) NOT NULL default '1',
UNIQUE KEY `id` ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =1


Any ideas what I might be doing wrong? Im using:
- phpMyAdmin 2.6.3-rc1
- MySQL 4.0.20-standard

Options: ReplyQuote


Subject
Written By
Posted
Error code #1064 trying to import SQL file.
July 02, 2005 09:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.