Passage en mysqli

This commit is contained in:
Michael RICOIS 2012-01-27 16:13:19 +00:00
parent 33ba681ce3
commit 1a787444c3

View File

@ -25,10 +25,10 @@ class EnvoiController extends Zend_Controller_Action
'username' => MYSQL_USER,
'password' => MYSQL_PASS,
'dbname' => MYSQL_DEFAULT_DB,
//'driver_options' => array(MYSQLI_INIT_COMMAND => 'SET NAMES UTF8;'),
'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;')
'driver_options' => array(MYSQLI_INIT_COMMAND => 'SET NAMES UTF8;'),
//'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;')
);
$sqlmetier = Zend_Db::factory('PDO_MYSQL', $dbConfig);
$sqlmetier = Zend_Db::factory('Mysqli', $dbConfig);
$sql = $sqlmetier->select()
->from('sdv1.clients', array('id', 'nom'))
->where("actif = 'Oui'");