// EDIT 这是配置错误。请忽略
出于某种原因,我无法设置silex以使用两个mysql连接。
这是我的配置
database:
dbs.options:
site:
driver: pdo_mysql
host: x.x.x.x
dbname: db1
user: user
password: pass
regular:
driver: pdo_mysql
host: x.x.x.x
dbname: db2
user: user
password: pass
当我尝试执行查询时,例如
$this->app['dbs']['site']->fetchAll('SELECT * FROM users);
我收到错误Identifier "site" is not defined.
我做错了什么?
答案 0 :(得分:0)