From cdaeaf9b8f83fd9b2a92a7c472763a49bed0a87d Mon Sep 17 00:00:00 2001 From: "Christophe.Boulain" <> Date: Tue, 12 Jan 2010 10:27:34 +0000 Subject: Fixed issue#208 --- framework/Data/TDbConnection.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework') diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 26d61883..6b84e1b3 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -167,9 +167,9 @@ class TDbConnection extends TComponent try { $this->_pdo=new PDO($this->getConnectionString(),$this->getUsername(), - $this->getPassword(),$this->_attributes); - // This attribute is only useful for PDO::MySql driver. - // Ignore the warning if a driver doesn't understand this. + $this->getPassword(),$this->_attributes); + // This attribute is only useful for PDO::MySql driver. + // Ignore the warning if a driver doesn't understand this. @$this->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->_active=true; @@ -204,7 +204,7 @@ class TDbConnection extends TComponent switch ($this->_pdo->getAttribute(PDO::ATTR_DRIVER_NAME)) { case 'mysql': - $stmt = $this->_pdo->prepare('SET CHARACTER SET ?'); + $stmt = $this->_pdo->prepare('SET NAMES ?'); break; case 'pgsql': $stmt = $this->_pdo->prepare('SET client_encoding TO ?'); -- cgit v1.2.3