0

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.

6
Contributors
9
Replies
19
Views
6 Years
Discussion Span
Last Post by Jan_2
0

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.

1

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

Edited by didi00: n/a

0

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

I'm glad that I could help:-)

0

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..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.