1
第一次遇到此類錯誤時,我意識到問題類似於此問題>Error #1064 in mysql所以我將TYPE=MyISAM
更改爲ENGINE=MyISAM
。mySQL錯誤:您的SQL語法錯誤(ENGINE = MyISAM)
但即使改變後,我遇到了類似的錯誤。它說,
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
。
我以爲改爲ENGINE=MyISAM
會解決錯誤,但它不會。我該怎麼辦?
這裏是我的代碼:
$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";
錯誤,只是爲了確保。所以我應該把'輸入的時間戳(14)'改成'輸入的時間戳記'? – deathlock
正確。順便提一下,如果適用,還應該將所有這些列指定爲「NOT NULL」。 – duskwuff
所以它會'輸入時間戳NOT NULL'? – deathlock