summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_driver.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-03-07 19:29:37 +0100
committerMike Funk <mfunk@xulonpress.com>2012-03-07 19:29:37 +0100
commit1909b5b1dd5e2d6847cbe4a87a0aadd52b506681 (patch)
tree8aaf0c86aa49dc0bacd55daeb2144d40c37ae8e0 /system/database/drivers/odbc/odbc_driver.php
parenta90b1f2f89a41b2fe061f5fdd3f84f08b961a887 (diff)
parent1d571971be8be78a92d31aad27dda4009770043f (diff)
merged from develop, fixed conflict in user guide.
Diffstat (limited to 'system/database/drivers/odbc/odbc_driver.php')
-rw-r--r--system/database/drivers/odbc/odbc_driver.php63
1 files changed, 11 insertions, 52 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 6ba39f0cd..2575f431d 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -124,35 +124,6 @@ class CI_DB_odbc_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Set client character set
- *
- * @access public
- * @param string
- * @param string
- * @return resource
- */
- function db_set_charset($charset, $collation)
- {
- // @todo - add support if needed
- return TRUE;
- }
-
- // --------------------------------------------------------------------
-
- /**
- * 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
@@ -316,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;
}
// --------------------------------------------------------------------
@@ -343,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)
{
@@ -414,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));
}
// --------------------------------------------------------------------
@@ -646,4 +605,4 @@ class CI_DB_odbc_driver extends CI_DB {
/* End of file odbc_driver.php */
-/* Location: ./system/database/drivers/odbc/odbc_driver.php */ \ No newline at end of file
+/* Location: ./system/database/drivers/odbc/odbc_driver.php */