2013-07-07 43 views
0

每當我嘗試加載我的數據燈具我不斷收到此錯誤:爲什麼不能教條清除我的數據庫?語法錯誤教義

[Doctrine\DBAL\DBALException]             
    An exception occurred while executing 'DELETE FROM Group':     

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i 
    n your SQL syntax; check the manual that corresponds to your MySQL server v 
    ersion for the right syntax to use near 'Group' at line 1 

我不想修改教義,但顯然它沒有使用正確的語法。我需要以不同的方式配置原則嗎?我使用smyfony2和mysql以及基本的教條捆綁。貝婁是我composer.json文件:

"require": { 
    "php": ">=5.3.3", 
    "symfony/symfony": "2.3.*", 
    "doctrine/orm": ">=2.2.3,<2.4-dev", 
    "doctrine/doctrine-bundle": "1.2.*", 
    "twig/extensions": "1.0.*", 
    "symfony/assetic-bundle": "2.3.*", 
    "symfony/swiftmailer-bundle": "2.3.*", 
    "symfony/monolog-bundle": "2.3.*", 
    "sensio/distribution-bundle": "2.3.*", 
    "sensio/framework-extra-bundle": "2.3.*", 
    "sensio/generator-bundle": "2.3.*", 
    "incenteev/composer-parameter-handler": "~2.0", 
    "doctrine/orm": "*", 
    "phpunit/phpunit": "3.7.*", 
    "doctrine/doctrine-migrations-bundle": "dev-master", 
    "doctrine/migrations": "dev-master", 
    "doctrine/doctrine-fixtures-bundle": "dev-master", 
    "doctrine/data-fixtures": "dev-master", 
    "ircmaxell/password-compat": "dev-master" 
}, 

回答

2

Groupmysql關鍵字。所以你可能想逃避它。

DELETE FROM `Group` 
+0

是的,這是我第二次愚蠢地犯這個錯誤。謝謝! –

+0

@ Mr.Student很高興幫助。如果這有用,請將答案標記爲已接受 – karthikr