summaryrefslogtreecommitdiff
path: root/framework/Data/TDbConnection.php
diff options
context:
space:
mode:
authorchristophe.boulain <>2008-12-03 14:22:03 +0000
committerchristophe.boulain <>2008-12-03 14:22:03 +0000
commit6228873cf9d6471463d2413e7dfd7447f759baf2 (patch)
tree496a0e658330c39d4caa35602ba9f783b6f24f9c /framework/Data/TDbConnection.php
parente8f239fea7351b248302a593a8e5eaa2a88c3e80 (diff)
Merge from trunk
Diffstat (limited to 'framework/Data/TDbConnection.php')
-rw-r--r--framework/Data/TDbConnection.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php
index 5489c7fd..259ca7b7 100644
--- a/framework/Data/TDbConnection.php
+++ b/framework/Data/TDbConnection.php
@@ -167,9 +167,11 @@ class TDbConnection extends TComponent
try
{
$this->_pdo=new PDO($this->getConnectionString(),$this->getUsername(),
- $this->getPassword(),$this->_attributes);
+ $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->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
$this->_active=true;
$this->setConnectionCharset();
}