diff options
author | Christophe.Boulain <> | 2010-01-12 10:27:34 +0000 |
---|---|---|
committer | Christophe.Boulain <> | 2010-01-12 10:27:34 +0000 |
commit | cdaeaf9b8f83fd9b2a92a7c472763a49bed0a87d (patch) | |
tree | 7b2158cf93a25c1c725ffe8aec0ff72d6b90a505 | |
parent | a57479c8fb7020e56891b9ca055b4d04075be2d8 (diff) |
Fixed issue#208
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Data/TDbConnection.php | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -8,6 +8,7 @@ BUG: Issue#188 - TDbCache doesn't check if db connection is active. (Yves) BUG: Issue#189 - Page State corrupted when EnableStateValidation=False (Christophe) BUG: Issue#191 - Bad parsing of MySQL ENUM type column (Yves) BUG: Issue#198 - "Undefined variable: tagName" after error in application configuration. (Christophe) +BUG: Issue#208 - TDbConnection.Charset not working properly (googlenew at pcforum.hu, Christophe) BUG: Issue#216 - TTabPanel doesn't preserve active tab on callback request (googlenew at pcforum.hu,Christophe) BUG: Typo in TBoundColumn (Robin) ENH: Add property ClientScriptManagerClass to TPageService and releated changes in TPage.getClientScript() (Yves) 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 ?');
|