Mohammed Osama Mohammed Osama - 4 months ago 11
MySQL Question

#1064 -You have an error in your SQL syntax

I'm new to PHP and MySQL and I get the following error message:


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 (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 15


CREATE TABLE ads(

id INT( 11 ) NOT NULL AUTO_INCREMENT ,
idplay INT( 11 ) DEFAULT '0' NOT NULL ,
name VARCHAR( 100 ) NOT NULL ,
COMMENT TEXT NOT NULL ,
email VARCHAR( 100 ) DEFAULT '0' NOT NULL ,
msg VARCHAR( 10 ) DEFAULT '0' NOT NULL ,
title VARCHAR( 150 ) NOT NULL ,
counter VARCHAR( 50 ) NOT NULL ,
DATE VARCHAR( 10 ) NOT NULL ,
show1 VARCHAR( 100 ) NOT NULL ,
,
PRIMARY KEY ( id )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;

Answer

Remove one comma above PRIMARY KEY ( id )

Comments