Web Hosting Talk







View Full Version : MySQL Error


Falco1199
09-21-2002, 10:01 PM
My friend is using phpMyAdmin to enter a MySQL query, but gets an error and doesn't understand it. I'm posting here for his lack of having an account.

The query:

CREATE TABLE smp_source (
sID int(11) NOT NULL auto_increment,
name varchar(40) default NULL,
version varchar(25) default NULL,
daterel datetime default NULL,
description blob,
notes blob,
filename blob,
clss varchar(20) not null,
license varchar(30)
pID int,
PRIMARY KEY (sID)
) TYPE=MyISAM

The error:

You have an error in your SQL syntax near 'pID int,
PRIMARY KEY (sID)
) TYPE=MyISAM' at line 11

Does anybody see the problem?

JustinH
09-21-2002, 11:38 PM
license varchar(30) is missing the "," ;). Generally speaking when you get an error on a line like that in MySQL (and in PHP generally) it means you forgot to escape the previous line.