diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-05 13:23:57 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-05 13:23:57 +0100 |
commit | 74496c268ae7199082cad86e0fea65687d78a2c9 (patch) | |
tree | 7a02e9961dda1e6949c4cbd986c894ffb9ed15a3 /system/database/drivers/mssql | |
parent | bb5dae46256cdcb0bcd204b6fa2fc628da6afb88 (diff) | |
parent | cc5af53346397846f2035dc2bf6a2c2f9b0cd4ab (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/mssql')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 2a4f2b575..147c63483 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -339,12 +339,11 @@ class CI_DB_mssql_driver extends CI_DB { /** * Version number query string * - * @access public - * @return string + * @return string */ - function _version() + protected function _version() { - return "SELECT @@VERSION AS ver"; + return 'SELECT @@VERSION AS ver'; } // -------------------------------------------------------------------- @@ -438,28 +437,18 @@ class CI_DB_mssql_driver extends CI_DB { // -------------------------------------------------------------------- /** - * The error message string + * Error * - * @access private - * @return string - */ - function _error_message() - { - return mssql_get_last_message(); - } - - // -------------------------------------------------------------------- - - /** - * The error message number + * Returns an array containing code and message of the last + * database error that has occured. * - * @access private - * @return integer + * @return array */ - function _error_number() + public function error() { - // Are error numbers supported? - return ''; + $query = $this->query('SELECT @@ERROR AS code'); + $query = $query->row(); + return array('code' => $query->code, 'message' => mssql_get_last_message()); } // -------------------------------------------------------------------- |