summaryrefslogtreecommitdiff
path: root/framework/Data/TDbConnection.php
diff options
context:
space:
mode:
authorjavalizard <>2010-04-18 04:31:22 +0000
committerjavalizard <>2010-04-18 04:31:22 +0000
commit20f46a1104240afbac704576bc6113d697b3ae7e (patch)
tree484a419fce34c3549392c8294e0212d429a1449c /framework/Data/TDbConnection.php
parent17b1d0b7c9e02f954d8877f40bfd814b2b8adec3 (diff)
Ensured parent::__construct calls within Data
Diffstat (limited to 'framework/Data/TDbConnection.php')
-rw-r--r--framework/Data/TDbConnection.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php
index 4726083c..3709f4d4 100644
--- a/framework/Data/TDbConnection.php
+++ b/framework/Data/TDbConnection.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2010 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Data
@@ -119,6 +119,7 @@ class TDbConnection extends TComponent
*/
public function __construct($dsn='',$username='',$password='', $charset='')
{
+ parent::__construct();
$this->_dsn=$dsn;
$this->_username=$username;
$this->_password=$password;
@@ -179,9 +180,9 @@ 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.
+ // 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;