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/cubrid | |
parent | bb5dae46256cdcb0bcd204b6fa2fc628da6afb88 (diff) | |
parent | cc5af53346397846f2035dc2bf6a2c2f9b0cd4ab (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/cubrid')
-rw-r--r-- | system/database/drivers/cubrid/cubrid_driver.php | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 42f08fbf6..afdaef351 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -156,19 +156,15 @@ class CI_DB_cubrid_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Version number query string + * Database version number * - * @access public * @return string */ - function _version() + public function version() { - // To obtain the CUBRID Server version, no need to run the SQL query. - // CUBRID PHP API provides a function to determin this value. - // This is why we also need to add 'cubrid' value to the list of - // $driver_version_exceptions array in DB_driver class in - // version() function. - return cubrid_get_server_info($this->conn_id); + return isset($this->data_cache['version']) + ? $this->data_cache['version'] + : $this->data_cache['version'] = cubrid_get_server_info($this->conn_id); } // -------------------------------------------------------------------- @@ -453,31 +449,18 @@ class CI_DB_cubrid_driver extends CI_DB { // -------------------------------------------------------------------- /** - * The error message string + * Error * - * @access private - * @return string - */ - function _error_message() - { - return cubrid_error($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 cubrid_errno($this->conn_id); + return array('code' => cubrid_errno($this->conn_id), 'message' => cubrid_error($this->conn_id)); } - // -------------------------------------------------------------------- - /** * Escape the SQL Identifiers * |