全文和类型的mysql问题

时间:2011-12-08 14:08:27

标签: php mysql sql apache mysql-error-1214

我正在使用xampp软件 在那我打开mysql我的管理员并粘贴该sql代码。这表示像

这样的错误

#1214 - The used table type doesn't support FULLTEXT indexes

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

CREATE TABLE code (
 id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
 title VARCHAR(50) NOT NULL,
 chapter TINYINT UNSIGNED NOT NULL,
 code TEXT NOT NULL,
 FULLTEXT (title,code)
) TYPE = MYISAM;

1 个答案:

答案 0 :(得分:2)

请改为尝试:

CREATE TABLE code 
( 
  id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  title VARCHAR(50) NOT NULL, 
  chapter TINYINT UNSIGNED NOT NULL, 
  code TEXT NOT NULL, 
  FULLTEXT (title,code) 
) ENGINE = MyISAM;