Postgresql symfony2推进束和x2B;postgres:靠近“0”的语法错误&引用;
这是我的登录表单,它使用Prope作为用户提供程序,我从中得到了一个我可以理解的错误,即没有引用标识符: 和错误:Postgresql symfony2推进束和x2B;postgres:靠近“0”的语法错误&引用;,postgresql,symfony,propel,Postgresql,Symfony,Propel,这是我的登录表单,它使用Prope作为用户提供程序,我从中得到了一个我可以理解的错误,即没有引用标识符: 和错误: Unable to execute SELECT statement [SELECT user.id, user.username, user.password, user.email, user.type, user.first_name, user.last_name, user.national_code, user.personal_code, user.role, use
Unable to execute SELECT statement [SELECT user.id, user.username, user.password, user.email, user.type, user.first_name, user.last_name, user.national_code, user.personal_code, user.role, user.card, user.university_id, user.salt, user.active, user.created_at, user.updated_at FROM user WHERE user.username=:p1 LIMIT 1] [wrapped: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "." LINE 1: SELECT user.id, user.username, user.password, user.email, us... ^]
我的推进配置:
propel:
path: "%kernel.root_dir%/../vendor/propel"
phing_path: "%kernel.root_dir%/../vendor/phing"
logging: %kernel.debug%
dbal:
default_connection: default
connections:
default:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%
options:
ATTR_PERSISTENT: false
attributes:
ATTR_EMULATE_PREPARES: true
settings:
charset: { value: UTF8 }
build_properties:
propel.database: %database_driver%
propel.database.url: ${propel.dsn}
propel.database.buildUrl: ${propel.database.url}
propel.database.createUrl: ${propel.database.buildUrl}
propel.database.user: %database_user%
propel.database.password: %database_password%
propel.platform.class: platform.${propel.database}Platform
propel.disableIdentifierQuoting: false
以及我的提供者配置:
providers:
main:
propel:
class: National\PublicationBundle\Model\User
property: username
我的配置有问题吗?我也在github上找到了,并相应地更改了代码,但它没有改变任何东西,我所做的是:
\$sql = sprintf(
'$query',
implode(', ', array_map(function(\$e) { return '\"'.\$e.'\"' ; }, \$modifiedColumns)),
implode(', ', array_keys(\$modifiedColumns))
))
还有一件事:当我使用php应用程序/控制台生成sql时:build:sql,sql代码被正确引用。回答:user是一个保留字!所以只需将其更改为用户并解决!:\ 答:用户是一个保留字!所以只需将其更改为用户并解决!:\