Hi guys,

I'm trying to set a database for a shopping cart. Here is some of the code:

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;

It gives me 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 10

I've tied to fix it like this: CREATE TABLE tbl_cart AUTO_INCREMENT = 58; but no luck.
Any suggestions?
Thanks.

Yeah, I've read this too:
but I couldn't do anything.

what is the problem.

only reading is not enough , you need to understand the basics of the code.

I figured it out myself. For someone that have similar problem:
Change TYPE = MYISAM AUTO_INCREMENT =58;
To ENGINE = MYISAM AUTO_INCREMENT =58;

thanks didi00 for the solution, I'm also learning that php shopping cart tutorial.

thanks didi00 for the solution, I'm also learning that php shopping cart tutorial.

I'm glad that I could help:-)

Hai to all
I seen Similar error to me But fortunately my I got the Ans by simply changing the "TYPE" to "ENGINE" for engine type.. Try this good luck..

"TYPE" to "ENGINE" tx fixed :)

"TYPE" to "ENGINE"

yes, worked - thx a lot <3

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.