[英]mySQL error: You have an error in your SQL syntax (ENGINE=MyISAM)
At the first time I got such error, I realize the problem was similar to this question > Error #1064 in mysql So I changed the TYPE=MyISAM
on my code to ENGINE=MyISAM
. 第一次出现此类错误时,我意识到问题类似于此问题> mysql中的错误#1064,因此我将代码上的
TYPE=MyISAM
更改为ENGINE=MyISAM
。
But even after the changing, I encountered similar error. 但是即使更改后,我也遇到类似的错误。 It says,
它说,
mySQL error: 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 '(14), PRIMARY KEY (id) ) ENGINE=M' at line 7
mySQL error: 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 '(14), PRIMARY KEY (id) ) ENGINE=M' at line 7
. mySQL error: 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 '(14), PRIMARY KEY (id) ) ENGINE=M' at line 7
。
I thought changing to ENGINE=MyISAM
would fix the error, but it doesn't. 我以为更改为
ENGINE=MyISAM
可以解决该错误,但是不能。 What should I do? 我该怎么办?
Here is my code: 这是我的代码:
$queries[] = "CREATE TABLE IF NOT EXISTS {$prefix}conversationlog (
id int(11) NOT NULL auto_increment,
input text default '',
response text default '',
thatresponse text default '',
uid varchar(255) default NULL,
enteredtime timestamp(14),
PRIMARY KEY (id)
) ENGINE=MyISAM";
The error is at the (14)
, not ENGINE=MyISAM
. 错误发生在
(14)
,而不是ENGINE=MyISAM
。 The TIMESTAMP
type does not take a size; TIMESTAMP
类型不带大小。 it's always timestamp-sized. 它始终是时间戳大小的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.