summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-26 17:31:49 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-10-31 17:45:37 +0100
commit70eeb93361c4e6a08584fd600d173842e15a4f13 (patch)
treed76de5941b4a95360a31556921422b98ea87f734 /system
parentd019fd673a730bf87f1410a752818f16b6ced713 (diff)
Misc formatting fixes
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b4c3102ed..f69893273 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -78,8 +78,8 @@ class CI_DB_pdo_driver extends CI_DB {
$this->_like_escape_str = " ESCAPE '%s' ";
$this->_like_escape_chr = '!';
}
-
- $this->hostname = $this->hostname . ";dbname=".$this->database;
+
+ $this->hostname .= ";dbname=".$this->database;
$this->trans_enabled = FALSE;
$this->_random_keyword = ' RND('.time().')'; // database specific random keyword
@@ -94,7 +94,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);
}
// --------------------------------------------------------------------
@@ -107,10 +108,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);
}
// --------------------------------------------------------------------