summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-05 13:23:57 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-05 13:23:57 +0100
commit74496c268ae7199082cad86e0fea65687d78a2c9 (patch)
tree7a02e9961dda1e6949c4cbd986c894ffb9ed15a3 /system/database/drivers/odbc/odbc_driver.php
parentbb5dae46256cdcb0bcd204b6fa2fc628da6afb88 (diff)
parentcc5af53346397846f2035dc2bf6a2c2f9b0cd4ab (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc/odbc_driver.php')
-rw-r--r--system/database/drivers/odbc/odbc_driver.php33
1 files changed, 6 insertions, 27 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index fc4d1d365..a6e3dd7eb 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -123,18 +123,6 @@ class CI_DB_odbc_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Version number query string
- *
- * @return string
- */
- protected function _version()
- {
- return 'SELECT version() AS ver';
- }
-
- // --------------------------------------------------------------------
-
- /**
* Execute the query
*
* @param string an SQL query
@@ -369,25 +357,16 @@ class CI_DB_odbc_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * The error message string
+ * Error
*
- * @return string
- */
- protected function _error_message()
- {
- return odbc_errormsg($this->conn_id);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * The error message number
+ * Returns an array containing code and message of the last
+ * database error that has occured.
*
- * @return int
+ * @return array
*/
- protected function _error_number()
+ public function error()
{
- return odbc_error($this->conn_id);
+ return array('code' => odbc_error($this->conn_id), 'message' => odbc_errormsg($this->conn_id));
}
// --------------------------------------------------------------------