CI_DB_mysqli_result Class Reference

Inheritance diagram for CI_DB_mysqli_result:
Collaboration diagram for CI_DB_mysqli_result:

List of all members.


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.

Detailed Description

Definition at line 27 of file mysqli_result.php.


Member Function Documentation

CI_DB_mysqli_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

Returns:
array

Definition at line 136 of file mysqli_result.php.

00137         {
00138                 return mysqli_data_seek($this->result_id, $n);
00139         }

CI_DB_mysqli_result::_fetch_assoc (  ) 

Result - associative array.

Returns the result set as an array

private

Returns:
array

Reimplemented from CI_DB_result.

Definition at line 151 of file mysqli_result.php.

00152         {
00153                 return mysqli_fetch_assoc($this->result_id);
00154         }

CI_DB_mysqli_result::_fetch_object (  ) 

Result - object.

Returns the result set as an object

private

Returns:
object

Reimplemented from CI_DB_result.

Definition at line 166 of file mysqli_result.php.

00167         {
00168                 return mysqli_fetch_object($this->result_id);
00169         }

CI_DB_mysqli_result::field_data (  ) 

Field data.

Generates an array of objects containing field meta-data

public

Returns:
array

Reimplemented from CI_DB_result.

Definition at line 90 of file mysqli_result.php.

00091         {
00092                 $retval = array();
00093                 while ($field = mysqli_fetch_field($this->result_id))
00094                 {       
00095                         $F                              = new stdClass();
00096                         $F->name                = $field->name;
00097                         $F->type                = $field->type;
00098                         $F->default             = $field->def;
00099                         $F->max_length  = $field->max_length;
00100                         $F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;
00101                         
00102                         $retval[] = $F;
00103                 }
00104                 
00105                 return $retval;
00106         }

CI_DB_mysqli_result::field_names (  ) 

Reimplemented from CI_DB_result.

Definition at line 75 of file mysqli_result.php.

References list_fields().

00076         {
00077                 return $this->list_fields();
00078         }

Here is the call graph for this function:

CI_DB_mysqli_result::free_result (  ) 

Free the result.

Returns:
null

Reimplemented from CI_DB_result.

Definition at line 115 of file mysqli_result.php.

00116         {
00117                 if (is_object($this->result_id))
00118                 {
00119                         mysqli_free_result($this->result_id);
00120                         $this->result_id = FALSE;
00121                 }
00122         }

CI_DB_mysqli_result::list_fields (  ) 

Fetch Field Names.

Generates an array of column names

public

Returns:
array

Reimplemented from CI_DB_result.

Definition at line 63 of file mysqli_result.php.

Referenced by field_names().

00064         {
00065                 $field_names = array();
00066                 while ($field = mysqli_fetch_field($this->result_id))
00067                 {
00068                         $field_names[] = $field->name;
00069                 }
00070                 
00071                 return $field_names;
00072         }

Here is the caller graph for this function:

CI_DB_mysqli_result::num_fields (  ) 

Number of fields in the result set.

public

Returns:
integer

Reimplemented from CI_DB_result.

Definition at line 48 of file mysqli_result.php.

00049         {
00050                 return @mysqli_num_fields($this->result_id);
00051         }

CI_DB_mysqli_result::num_rows (  ) 

Number of rows in the result set.

public

Returns:
integer

Reimplemented from CI_DB_result.

Definition at line 35 of file mysqli_result.php.

00036         {
00037                 return @mysqli_num_rows($this->result_id);
00038         }


The documentation for this class was generated from the following file: