summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorChristophe.Boulain <>2010-01-12 10:27:34 +0000
committerChristophe.Boulain <>2010-01-12 10:27:34 +0000
commitcdaeaf9b8f83fd9b2a92a7c472763a49bed0a87d (patch)
tree7b2158cf93a25c1c725ffe8aec0ff72d6b90a505 /framework/Data
parenta57479c8fb7020e56891b9ca055b4d04075be2d8 (diff)
Fixed issue#208
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/TDbConnection.php8
1 files changed, 4 insertions, 4 deletions
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 ?');