summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-26 17:31:49 +0200
committerTimothy Warren <tim@timshomepage.net>2011-10-26 17:31:49 +0200
commitd93393f446c59707f655407594ff0fe307c1b9d6 (patch)
tree121a6c3f6582324673d9c8bd1d07f6185cde4746 /system/database/drivers/pdo/pdo_driver.php
parent7d834be1501dcc3dc85af546f973f27fefcbd0f4 (diff)
Misc formatting fixes
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b727b8098..a66a16e90 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -90,7 +90,7 @@ class CI_DB_pdo_driver extends CI_DB {
$this->_like_escape_chr = '!';
}
- $this->hostname = $this->hostname . ";dbname=".$this->database;
+ $this->hostname .= ";dbname=".$this->database;
$this->trans_enabled = FALSE;
@@ -106,7 +106,8 @@ class CI_DB_pdo_driver extends CI_DB {
function db_connect()
{
$this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT;
- return new PDO($this->hostname,$this->username,$this->password, $this->options);
+
+ return new PDO($this->hostname, $this->username, $this->password, $this->options);
}
// --------------------------------------------------------------------
@@ -119,10 +120,10 @@ class CI_DB_pdo_driver extends CI_DB {
*/
function db_pconnect()
{
- return new PDO($this->hostname,$this->username,$this->password, array(
- PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT,
- PDO::ATTR_PERSISTENT => true
- ));
+ $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT;
+ $this->options['PDO::ATTR_PERSISTENT'] = TRUE;
+
+ return new PDO($this->hostname, $this->username, $this->password, $this->options);
}
// --------------------------------------------------------------------