1

每当我尝试加载我的数据设备时,我都会收到此错误:

  [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"
},
4

1 回答 1

3

Group是 中的关键字mysql。所以你可能想逃避它。

DELETE FROM `Group`
于 2013-07-07T04:23:23.097 回答