----- Original Message -----From: EdSent: Tuesday, October 25, 2005 6:40 PMSubject: Problem with syntax 4 creating 1 tableShawn green was very kindly helping me ouy trying to make mysql tables and I thought I had go the hang of it until I get this error-any ideas? Thanks a lot
CREATE TABLE PurchasedProducts(
`int_saleCart` INT AUTO_INCREMENT NOT NULL ,) ENGINE = MYISAM
`int_ClientID` INT,
`int_ProductID` INT,
`int_Quantity` INT,
`int_saleCart` PRIMARY KEY ( int_saleCart )#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 'PRIMARY KEY ( int_saleCart )
) ENGINE = MYISAM' at line 6
You need a comma before the "PRIMARY KEY"
clause. That should solve your problem. In other words, change the second last
line so that it looks like this: `int_saleCart`,
PRIMARY KEY ( int_saleCart ) ----------^------------------------ Rhino