summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-20 15:39:16 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-20 15:39:16 +0100
commitc082292f0678b71b8c3d323ea74f847ed4da100e (patch)
tree0fa0426f288e8f929ff50849e3c54f723ac52bcc /system/database/drivers/odbc/odbc_result.php
parent56c879a870600b3e3ffce586c849d53e85f93674 (diff)
parent4d1167149a9bad94bdc6a6947525d4c610f0e3aa (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc/odbc_result.php')
-rw-r--r--system/database/drivers/odbc/odbc_result.php57
1 files changed, 29 insertions, 28 deletions
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index de2c58cb9..30cc979ce 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))
{
@@ -148,10 +146,9 @@ class CI_DB_odbc_result extends CI_DB_result {
* this internally before fetching results to make sure the
* result set starts at zero
*
- * @access private
- * @return array
+ * @return bool
*/
- function _data_seek($n = 0)
+ protected function _data_seek($n = 0)
{
return FALSE;
}
@@ -163,12 +160,11 @@ class CI_DB_odbc_result extends CI_DB_result {
*
* 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 +181,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 +195,7 @@ class CI_DB_odbc_result extends CI_DB_result {
}
}
+ // --------------------------------------------------------------------
/**
* Result - object
@@ -207,21 +203,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 +228,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 +319,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