Zend 2: SQLSRV: $prepareParams is not being set

前端 未结 3 1680
感情败类
感情败类 2021-01-24 09:40

Can somebody explain me where the

->setPrepareParams(array $prepareParams) 

is called in Zend\\Db\\Adapter\\Driver\\Sqlsrv\\Statement.php?<

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-24 09:48

    In your database configuration, what is your connection driver? PHP supports parameterized queries only through PDO, and Zend Framework cannot go beyond what PHP is capable of. Therefore, to get array("Personalnummer" => $personalnumber) to work, you need to have configuration driver key be pdo_sqlsrv. Sounds like you have 'driver' => 'Sqlsrv' instead.

提交回复
热议问题