-
Notifications
You must be signed in to change notification settings - Fork 0
CI_DB_result
Database Result Class
This is the platform-independent result class. This class will not be called directly. Rather, the adapter class for the specific database will extend and instantiate it.
- Class name: CI_DB_result
- Namespace:
public resource $conn_id
Connection ID
- Visibility: public
public resource $result_id
Result ID
- Visibility: public
public array<mixed,array> $result_array = array()
Result Array
- Visibility: public
public array<mixed,object> $result_object = array()
Result Object
- Visibility: public
public array<mixed,object> $custom_result_object = array()
Custom Result Object
- Visibility: public
public integer $current_row
Current Row index
- Visibility: public
public integer $num_rows
Number of rows
- Visibility: public
public array $row_data
Row data
- Visibility: public
void CI_DB_result::__construct(object $driver_object)
Constructor
- Visibility: public
- $driver_object object
integer CI_DB_result::num_rows()
Number of rows in the result set
- Visibility: public
array CI_DB_result::result(string $type)
Query result. Acts as a wrapper function for the following functions.
- Visibility: public
- $type string - <p>'object', 'array' or a custom class name</p>
array CI_DB_result::custom_result_object(string $class_name)
Custom query result.
- Visibility: public
- $class_name string
array CI_DB_result::result_object()
Query result. "object" version.
- Visibility: public
array CI_DB_result::result_array()
Query result. "array" version.
- Visibility: public
mixed CI_DB_result::row(mixed $n, string $type)
Row
A wrapper method.
- Visibility: public
- $n mixed
- $type string - <p>'object' or 'array'</p>
void CI_DB_result::set_row(mixed $key, mixed $value)
Assigns an item into a particular column slot
- Visibility: public
- $key mixed
- $value mixed
object CI_DB_result::custom_row_object(integer $n, string $type)
Returns a single result row - custom object version
- Visibility: public
- $n integer
- $type string
object CI_DB_result::row_object(integer $n)
Returns a single result row - object version
- Visibility: public
- $n integer
array CI_DB_result::row_array(integer $n)
Returns a single result row - array version
- Visibility: public
- $n integer
mixed CI_DB_result::first_row(string $type)
Returns the "first" row
- Visibility: public
- $type string
mixed CI_DB_result::last_row(string $type)
Returns the "last" row
- Visibility: public
- $type string
mixed CI_DB_result::next_row(string $type)
Returns the "next" row
- Visibility: public
- $type string
mixed CI_DB_result::previous_row(string $type)
Returns the "previous" row
- Visibility: public
- $type string
mixed CI_DB_result::unbuffered_row(string $type)
Returns an unbuffered row and move pointer to next row
- Visibility: public
- $type string - <p>'array', 'object' or a custom class name</p>
integer CI_DB_result::num_fields()
Number of fields in the result set
Overridden by driver result classes.
- Visibility: public
array CI_DB_result::list_fields()
Fetch Field Names
Generates an array of column names.
Overridden by driver result classes.
- Visibility: public
array CI_DB_result::field_data()
Field data
Generates an array of objects containing field meta-data.
Overridden by driver result classes.
- Visibility: public
void CI_DB_result::free_result()
Free the result
Overridden by driver result classes.
- Visibility: public
boolean CI_DB_result::data_seek(integer $n)
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.
Overridden by driver result classes.
- Visibility: public
- $n integer
array CI_DB_result::_fetch_assoc()
Result - associative array
Returns the result set as an array.
Overridden by driver result classes.
- Visibility: protected
object CI_DB_result::_fetch_object(string $class_name)
Result - object
Returns the result set as an object.
Overridden by driver result classes.
- Visibility: protected
- $class_name string