How to make pdo run set names utf8 each time I connect, in zendframework?
Answer Posted / Vikas Agarwal
To make PDO run SET NAMES UTF8 each time you connect in Zend Framework, follow these steps:n1. Create a new Db adapter that extends Zend_Db_Adapter_Pdo_Abstract.n2. Override the __construct() method and call the parent constructor with the necessary configuration settings.n3. Add the following code to set the charset:
```php
$this->_connection->exec('SET NAMES utf8');
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers