Я хотел бы сделать setAttribute()
для dbadapter в Zend Framework 3
Я хочу сделать:
setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION)
Можно ли сделать "setAttribute" насоединение?
В module.php
$resultSetPrototype = new ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new Model\Entity\ListeDr());
$tableGateway = new TableGateway('liste_dr', $container->get('db_common'), null, $resultSetPrototype);
$dbAdapter = $container->get('db_site');
$dbAdapter->query('SET SEARCH_PATH TO prod', \Zend\Db\Adapter\Adapter::QUERY_MODE_EXECUTE);
В модели:
try {
$aData = $this->dbAdapter->query($sSql)->execute();
} catch (Exception $e) {
}
Большое спасибо