diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-02 05:03:39 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-02 05:03:39 +0200 |
commit | d8159e49acd2ab61bd8390eb123f05adc07c6bdb (patch) | |
tree | cf80f02092a50db6b2857a54c7f558d7dcb1158c /system/database/drivers/sqlsrv/sqlsrv_driver.php | |
parent | 0fd760e9765ea6785b4bd59d65365a079717ca6a (diff) | |
parent | 3396d531e2f3864d06860cdbdf7320bc121f77f1 (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_driver.php')
-rw-r--r-- | system/database/drivers/sqlsrv/sqlsrv_driver.php | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 9f2f88699..bb4f009bc 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -55,7 +55,7 @@ class CI_DB_sqlsrv_driver extends CI_DB { * used for the count_all() and count_all_results() functions. */ protected $_count_string = 'SELECT COUNT(*) AS '; - protected $_random_keyword = ' ASC'; // not currently supported + protected $_random_keyword = ' NEWID()'; // not currently supported /** * Non-persistent database connection @@ -68,12 +68,12 @@ class CI_DB_sqlsrv_driver extends CI_DB { $character_set = (0 === strcasecmp('utf8', $this->char_set)) ? 'UTF-8' : $this->char_set; $connection = array( - 'UID' => empty($this->username) ? '' : $this->username, - 'PWD' => empty($this->password) ? '' : $this->password, - 'Database' => $this->database, - 'ConnectionPooling' => $pooling ? 1 : 0, + 'UID' => empty($this->username) ? '' : $this->username, + 'PWD' => empty($this->password) ? '' : $this->password, + 'Database' => $this->database, + 'ConnectionPooling' => $pooling ? 1 : 0, 'CharacterSet' => $character_set, - 'ReturnDatesAsStrings' => 1 + 'ReturnDatesAsStrings' => 1 ); // If the username and password are both empty, assume this is a @@ -259,23 +259,6 @@ class CI_DB_sqlsrv_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Parse major version - * - * Grabs the major version number from the - * database server version string passed in. - * - * @param string $version - * @return int major version number - */ - protected function _parse_major_version($version) - { - preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info); - return $ver_info[1]; // return the major version b/c that's all we're interested in. - } - - // -------------------------------------------------------------------- - - /** * Database version number * * @return string |