我的模块代码中包含以下语句:
db_query("ALTER TABLE {tripletex_invoice} AUTO_INCREMENT = :number", array(':number' => $start_value));
在SimpleTest期间,我收到以下错误消息:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 ''20000'' at
line 1: ALTER TABLE {tripletex_invoice} AUTO_INCREMENT = :value; Array (
[:value] => 20000 ) in _tripletex_add_invoice_log() (line 1769 of
/var/www/d7/sites/all/modules/tripletex/tripletex.module).
为什么?