summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_result.php
diff options
context:
space:
mode:
authorJamie Rumbelow <jamie@jamierumbelow.net>2012-04-26 14:27:35 +0200
committerJamie Rumbelow <jamie@jamierumbelow.net>2012-04-26 14:27:35 +0200
commitd6ce1e936d60487ad8ddd099a040fba7d8f88367 (patch)
tree31dcdda9a24e2ed12135659a4e38cb4f35b0af31 /system/database/drivers/odbc/odbc_result.php
parentbcee50ff3247dee71d83bf273e52bc10096cd48c (diff)
parent9e2d5d130eff40592b49337a8ba4d8c170934de1 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Conflicts: system/core/Loader.php system/database/DB_query_builder.php system/database/drivers/cubrid/cubrid_driver.php system/database/drivers/mssql/mssql_driver.php system/database/drivers/mysql/mysql_driver.php system/database/drivers/mysqli/mysqli_driver.php system/database/drivers/oci8/oci8_driver.php system/database/drivers/odbc/odbc_driver.php system/database/drivers/pdo/pdo_driver.php system/database/drivers/postgre/postgre_driver.php system/database/drivers/sqlite/sqlite_driver.php user_guide_src/source/changelog.rst user_guide_src/source/database/query_builder.rst
Diffstat (limited to 'system/database/drivers/odbc/odbc_result.php')
-rw-r--r--system/database/drivers/odbc/odbc_result.php69
1 files changed, 27 insertions, 42 deletions
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index de2c58cb9..ecba5977e 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -1,13 +1,13 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
- *
+ *
* Licensed under the Open Software License version 3.0
- *
+ *
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* ODBC Result Class
*
@@ -128,9 +126,9 @@ class CI_DB_odbc_result extends CI_DB_result {
/**
* Free the result
*
- * @return null
+ * @return void
*/
- function free_result()
+ public function free_result()
{
if (is_resource($this->result_id))
{
@@ -142,33 +140,15 @@ class CI_DB_odbc_result extends CI_DB_result {
// --------------------------------------------------------------------
/**
- * Data Seek
- *
- * Moves the internal pointer to the desired offset. We call
- * this internally before fetching results to make sure the
- * result set starts at zero
- *
- * @access private
- * @return array
- */
- function _data_seek($n = 0)
- {
- return FALSE;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Result - associative array
*
* Returns the result set as an array
*
- * @access private
* @return array
*/
- function _fetch_assoc()
+ protected function _fetch_assoc()
{
- if (function_exists('odbc_fetch_object'))
+ if (function_exists('odbc_fetch_array'))
{
return odbc_fetch_array($this->result_id);
}
@@ -185,10 +165,9 @@ class CI_DB_odbc_result extends CI_DB_result {
*
* Returns the result set as an object
*
- * @access private
* @return object
*/
- function _fetch_object()
+ protected function _fetch_object()
{
if (function_exists('odbc_fetch_object'))
{
@@ -200,6 +179,7 @@ class CI_DB_odbc_result extends CI_DB_result {
}
}
+ // --------------------------------------------------------------------
/**
* Result - object
@@ -207,21 +187,24 @@ class CI_DB_odbc_result extends CI_DB_result {
* subsititutes the odbc_fetch_object function when
* not available (odbc_fetch_object requires unixODBC)
*
- * @access private
* @return object
*/
- function _odbc_fetch_object(& $odbc_result) {
+ protected function _odbc_fetch_object(& $odbc_result)
+ {
$rs = array();
$rs_obj = FALSE;
- if (odbc_fetch_into($odbc_result, $rs)) {
- foreach ($rs as $k=>$v) {
- $field_name= odbc_field_name($odbc_result, $k+1);
+ if (odbc_fetch_into($odbc_result, $rs))
+ {
+ foreach ($rs as $k => $v)
+ {
+ $field_name = odbc_field_name($odbc_result, $k+1);
$rs_obj->$field_name = $v;
}
}
return $rs_obj;
}
+ // --------------------------------------------------------------------
/**
* Result - array
@@ -229,16 +212,18 @@ class CI_DB_odbc_result extends CI_DB_result {
* subsititutes the odbc_fetch_array function when
* not available (odbc_fetch_array requires unixODBC)
*
- * @access private
* @return array
*/
- function _odbc_fetch_array(& $odbc_result) {
+ protected function _odbc_fetch_array(& $odbc_result)
+ {
$rs = array();
$rs_assoc = FALSE;
- if (odbc_fetch_into($odbc_result, $rs)) {
- $rs_assoc=array();
- foreach ($rs as $k=>$v) {
- $field_name= odbc_field_name($odbc_result, $k+1);
+ if (odbc_fetch_into($odbc_result, $rs))
+ {
+ $rs_assoc = array();
+ foreach ($rs as $k => $v)
+ {
+ $field_name = odbc_field_name($odbc_result, $k+1);
$rs_assoc[$field_name] = $v;
}
}
@@ -318,4 +303,4 @@ class CI_DB_odbc_result extends CI_DB_result {
}
/* End of file odbc_result.php */
-/* Location: ./system/database/drivers/odbc/odbc_result.php */
+/* Location: ./system/database/drivers/odbc/odbc_result.php */ \ No newline at end of file