

Public Member Functions | |
| num_rows () | |
| Number of rows in the result set. | |
| num_fields () | |
| Number of fields in the result set. | |
| list_fields () | |
| Fetch Field Names. | |
| field_names () | |
| field_data () | |
| Field data. | |
| free_result () | |
| Free the result. | |
| _data_seek ($n=0) | |
| Data Seek. | |
| _fetch_assoc () | |
| Result - associative array. | |
| _fetch_object () | |
| Result - object. | |
| _odbc_fetch_object (&$odbc_result) | |
| Result - object. | |
| _odbc_fetch_array (&$odbc_result) | |
| Result - array. | |
Definition at line 27 of file odbc_result.php.
| CI_DB_odbc_result::_data_seek | ( | $ | n = 0 |
) |
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
private
Definition at line 136 of file odbc_result.php.
| CI_DB_odbc_result::_fetch_assoc | ( | ) |
Result - associative array.
Returns the result set as an array
private
Reimplemented from CI_DB_result.
Definition at line 151 of file odbc_result.php.
References _odbc_fetch_array().
00152 { 00153 if (function_exists('odbc_fetch_object')) 00154 { 00155 return odbc_fetch_array($this->result_id); 00156 } 00157 else 00158 { 00159 return $this->_odbc_fetch_array($this->result_id); 00160 } 00161 }

| CI_DB_odbc_result::_fetch_object | ( | ) |
Result - object.
Returns the result set as an object
private
Reimplemented from CI_DB_result.
Definition at line 173 of file odbc_result.php.
References _odbc_fetch_object().
00174 { 00175 if (function_exists('odbc_fetch_object')) 00176 { 00177 return odbc_fetch_object($this->result_id); 00178 } 00179 else 00180 { 00181 return $this->_odbc_fetch_object($this->result_id); 00182 } 00183 }

| CI_DB_odbc_result::_odbc_fetch_array | ( | &$ | odbc_result | ) |
Result - array.
subsititutes the odbc_fetch_array function when not available (odbc_fetch_array requires unixODBC)
private
Definition at line 217 of file odbc_result.php.
Referenced by _fetch_assoc().
00217 { 00218 $rs = array(); 00219 $rs_assoc = false; 00220 if (odbc_fetch_into($odbc_result, $rs)) { 00221 $rs_assoc=array(); 00222 foreach ($rs as $k=>$v) { 00223 $field_name= odbc_field_name($odbc_result, $k+1); 00224 $rs_assoc[$field_name] = $v; 00225 } 00226 } 00227 return $rs_assoc; 00228 }

| CI_DB_odbc_result::_odbc_fetch_object | ( | &$ | odbc_result | ) |
Result - object.
subsititutes the odbc_fetch_object function when not available (odbc_fetch_object requires unixODBC)
private
Definition at line 195 of file odbc_result.php.
Referenced by _fetch_object().
00195 { 00196 $rs = array(); 00197 $rs_obj = false; 00198 if (odbc_fetch_into($odbc_result, $rs)) { 00199 foreach ($rs as $k=>$v) { 00200 $field_name= odbc_field_name($odbc_result, $k+1); 00201 $rs_obj->$field_name = $v; 00202 } 00203 } 00204 return $rs_obj; 00205 }

| CI_DB_odbc_result::field_data | ( | ) |
Field data.
Generates an array of objects containing field meta-data
public
Reimplemented from CI_DB_result.
Definition at line 90 of file odbc_result.php.
References num_fields().
00091 { 00092 $retval = array(); 00093 for ($i = 0; $i < $this->num_fields(); $i++) 00094 { 00095 $F = new stdClass(); 00096 $F->name = odbc_field_name($this->result_id, $i); 00097 $F->type = odbc_field_type($this->result_id, $i); 00098 $F->max_length = odbc_field_len($this->result_id, $i); 00099 $F->primary_key = 0; 00100 $F->default = ''; 00101 00102 $retval[] = $F; 00103 } 00104 00105 return $retval; 00106 }

| CI_DB_odbc_result::field_names | ( | ) |
Reimplemented from CI_DB_result.
Definition at line 75 of file odbc_result.php.
References list_fields().
00076 { 00077 return $this->list_fields(); 00078 }

| CI_DB_odbc_result::free_result | ( | ) |
Free the result.
Reimplemented from CI_DB_result.
Definition at line 115 of file odbc_result.php.
00116 { 00117 if (is_resource($this->result_id)) 00118 { 00119 odbc_free_result($this->result_id); 00120 $this->result_id = FALSE; 00121 } 00122 }
| CI_DB_odbc_result::list_fields | ( | ) |
Fetch Field Names.
Generates an array of column names
public
Reimplemented from CI_DB_result.
Definition at line 63 of file odbc_result.php.
References num_fields().
Referenced by field_names().
00064 { 00065 $field_names = array(); 00066 for ($i = 0; $i < $this->num_fields(); $i++) 00067 { 00068 $field_names[] = odbc_field_name($this->result_id, $i); 00069 } 00070 00071 return $field_names; 00072 }


| CI_DB_odbc_result::num_fields | ( | ) |
Number of fields in the result set.
public
Reimplemented from CI_DB_result.
Definition at line 48 of file odbc_result.php.
Referenced by field_data(), and list_fields().

| CI_DB_odbc_result::num_rows | ( | ) |
Number of rows in the result set.
public
Reimplemented from CI_DB_result.
Definition at line 35 of file odbc_result.php.