Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error #1064 in mysql [duplicate]

Tags:

mysql

I keep getting 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 'TYPE=MyISAM AUTO_INCREMENT=58' at line 11

This is my query :

CREATE TABLE `tbl_cart` (
`ct_id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`pd_id` int( 10 ) unsigned NOT NULL default '0',
`ct_qty` mediumint( 8 ) unsigned NOT NULL default '1',
`ct_session_id` char( 32 ) NOT NULL default '',
`ct_date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY ( `ct_id` ) ,
KEY `pd_id` ( `pd_id` ) ,
KEY `ct_session_id` ( `ct_session_id` )
) TYPE = MYISAM AUTO_INCREMENT =58;

Help Me What the problem is ...

like image 760
Peyman Omidi Avatar asked Mar 13 '12 08:03

Peyman Omidi


1 Answers

The keyword TYPE is removed since MySQL 5.1, use

) ENGINE = MYISAM AUTO_INCREMENT =58;

instead.

like image 85
Joachim Isaksson Avatar answered Oct 11 '22 12:10

Joachim Isaksson