summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Bilbie <alex.bilbie@gmail.com>2011-03-13 00:35:29 +0100
committerAlex Bilbie <alex.bilbie@gmail.com>2011-03-13 00:35:29 +0100
commit5336ee283c764a8f3ef9baa746324d7f6a26499f (patch)
tree8b6f3a94a8885269936ae6ad7bb6508fb29c773a
parent079069c2fa70b142fb4313f12f1fdf3f11713ff5 (diff)
Added flag to return dates as strings instead of PHP date objects. Updated db_select
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 53d974837..25cc628df 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -60,7 +60,7 @@ class CI_DB_mssql_driver extends CI_DB {
$this->hostname .= ','.$this->port;
}
- return @sqlsrv_connect($this->hostname, array('UID' => $this->username, 'PWD' => $this->password, 'Database' => $this->database, 'ConnectionPooling' => 0));
+ return @sqlsrv_connect($this->hostname, array('UID' => $this->username, 'PWD' => $this->password, 'Database' => $this->database, 'ConnectionPooling' => 0, 'ReturnDatesAsStrings' => 1));
}
// --------------------------------------------------------------------
@@ -78,7 +78,7 @@ class CI_DB_mssql_driver extends CI_DB {
$this->hostname .= ','.$this->port;
}
- return @sqlsrv_connect($this->hostname, array('UID' => $this->username, 'PWD' => $this->password, 'Database' => $this->database, 'ConnectionPooling' => 1));
+ return @sqlsrv_connect($this->hostname, array('UID' => $this->username, 'PWD' => $this->password, 'Database' => $this->database, 'ConnectionPooling' => 1, 'ReturnDatesAsStrings' => 1));
}
// --------------------------------------------------------------------
@@ -107,7 +107,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function db_select()
{
- // not implemented in sqlsrv
+ return $this->_execute('USE ' . $this->database);
}
// --------------------------------------------------------------------