2
OS:Debian的/的contrib-jessie64 的SQL Server 2014快速 PHP 5.6 Laravel 5.4Laravel 5.4多SqlServer的连接与DBLIB freetds的8.0
使用鼓捣可以运行查询在不同的连接,但在 “浏览器模式” 可不能连接到多个连接。
我有这样的一些控制:
$this->saveToAnotherConnection();
$row = \Contoso\Apartment::findOrNew($this->request['ApartmentID']);
$row->fill($this->request->all());
$row->save();
saveToAnotherConnection函数打开一个PDO连接,而是抛出异常:
$this->connection = new \PDO("dblib:host=10.0.1.11;dbname=Contoso", "sa", "sa sa ya tu sa! ya tu sa!");
异常消息:
SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)
我不使用
Laravel数据库配置,因为我正在使用接收$ this->连接的库姿态。