Question
Here is my error(if you need any more info just ask)- Error SQL query:
CREATE TABLE dave_bannedwords(
id INT( 11 ) NOT NULL AUTO_INCREMENT ,
word VARCHAR( 60 ) NOT NULL DEFAULT '',
PRIMARY KEY ( id ) ,
KEY id( id )
) TYPE = MYISAM ;
MySQL said:
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' at line 6
Answer
As documented under CREATE TABLE
Syntax:
Note
The olderTYPE
option was synonymous withENGINE
.TYPE
was deprecated in MySQL 4.0 and removed in MySQL 5.5. When upgrading to MySQL 5.5 or later, you must convert existing applications that rely onTYPE
to useENGINE
instead.
Therefore, you want:
CREATE TABLE dave_bannedwords(
id INT(11) NOT NULL AUTO_INCREMENT,
word VARCHAR(60) NOT NULL DEFAULT '',
PRIMARY KEY (id),
KEY id(id) -- this is superfluous in the presence of your PK, ergo unnecessary
) ENGINE = MyISAM ;