/** * Creates a PDO object and connects to the database. * * @return void * @throws \Zend\DB\Adapter\Exception */ protected function _connect() { if ($this->_connection) { return; } parent::_connect(); if (!empty($this->_config['charset'])) { $sql = "SET NAMES '" . $this->_config['charset'] . "'"; $this->_connection->exec($sql); } }
/** * @return void */ protected function _connect() { if ($this->_connection) { return; } parent::_connect(); $this->_connection->exec('SET QUOTED_IDENTIFIER ON'); }