我有一個名爲order
的表的數據庫。 當我運行php symfony doctrine:build --all
,我得到了如下因素的錯誤:Symfony doctrine :: build任務不能創建名爲order的表
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 'order (id BIGINT AUTO_INCREMENT, status VARCHAR(255), colissimonumber VARCHAR(25' at line 1. Failing Query: "CREATE TABLE order (id BIGINT AUTO_INCREMENT, status VARCHAR(255), colissimonumber VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = MyISAM".
的問題顯然是爲了不具有反引號arount它(如果我手動運行在phpMyAdmin與反引號查詢,它的工作原理)
如何我是否告訴學說在表格和字段名稱周圍添加反引號?任何解決方法exept重命名我的表?
我跑的symfony 1.4.9教義1.2
在旁註中,您也可以在databases.yml中執行此操作:attributes:{quote_identifier:true} – Gerry 2011-04-26 13:28:25