diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-09 13:37:16 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-09 13:37:16 +0100 |
commit | 242500d51695e4177ec99a3221086f51f55c8862 (patch) | |
tree | 9d341a1ef94a97c1a5f8818e4103312e022927fa /system/database/drivers/odbc/odbc_driver.php | |
parent | e00ee42d2b6f1540bee1ae1bee7dbc3232c58d5e (diff) | |
parent | c016a1102e2a77e0c27b9656c19a0460df24dfb6 (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc/odbc_driver.php')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index abb660324..2575f431d 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -124,19 +124,6 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT version() AS ver"; - } - - // -------------------------------------------------------------------- - - /** * Execute the query * * @access private called by the base class @@ -300,12 +287,11 @@ class CI_DB_odbc_driver extends CI_DB { /** * Insert ID * - * @access public - * @return integer + * @return bool */ - function insert_id() + public function insert_id() { - return @odbc_insert_id($this->conn_id); + return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE; } // -------------------------------------------------------------------- @@ -327,7 +313,7 @@ class CI_DB_odbc_driver extends CI_DB { return 0; } - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); + $query = $this->query($this->_count_string . $this->protect_identifiers('numrows') . " FROM " . $this->protect_identifiers($table, TRUE, NULL, FALSE)); if ($query->num_rows() == 0) { @@ -398,27 +384,16 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- /** - * The error message string + * Error * - * @access private - * @return string - */ - 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. * - * @access private - * @return integer + * @return array */ - 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)); } // -------------------------------------------------------------------- |