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: Properties ---------- ### $conn_id public resource $conn_id Connection ID * Visibility: **public** ### $result_id public resource $result_id Result ID * Visibility: **public** ### $result_array public array $result_array = array() Result Array * Visibility: **public** ### $result_object public array $result_object = array() Result Object * Visibility: **public** ### $custom_result_object public array $custom_result_object = array() Custom Result Object * Visibility: **public** ### $current_row public integer $current_row Current Row index * Visibility: **public** ### $num_rows public integer $num_rows Number of rows * Visibility: **public** ### $row_data public array $row_data Row data * Visibility: **public** Methods ------- ### __construct void CI_DB_result::__construct(object $driver_object) Constructor * Visibility: **public** #### Arguments * $driver_object **object** ### num_rows integer CI_DB_result::num_rows() Number of rows in the result set * Visibility: **public** ### result array CI_DB_result::result(string $type) Query result. Acts as a wrapper function for the following functions. * Visibility: **public** #### Arguments * $type **string** - <p>'object', 'array' or a custom class name</p> ### custom_result_object array CI_DB_result::custom_result_object(string $class_name) Custom query result. * Visibility: **public** #### Arguments * $class_name **string** ### result_object array CI_DB_result::result_object() Query result. "object" version. * Visibility: **public** ### result_array array CI_DB_result::result_array() Query result. "array" version. * Visibility: **public** ### row mixed CI_DB_result::row(mixed $n, string $type) Row A wrapper method. * Visibility: **public** #### Arguments * $n **mixed** * $type **string** - <p>'object' or 'array'</p> ### set_row void CI_DB_result::set_row(mixed $key, mixed $value) Assigns an item into a particular column slot * Visibility: **public** #### Arguments * $key **mixed** * $value **mixed** ### custom_row_object object CI_DB_result::custom_row_object(integer $n, string $type) Returns a single result row - custom object version * Visibility: **public** #### Arguments * $n **integer** * $type **string** ### row_object object CI_DB_result::row_object(integer $n) Returns a single result row - object version * Visibility: **public** #### Arguments * $n **integer** ### row_array array CI_DB_result::row_array(integer $n) Returns a single result row - array version * Visibility: **public** #### Arguments * $n **integer** ### first_row mixed CI_DB_result::first_row(string $type) Returns the "first" row * Visibility: **public** #### Arguments * $type **string** ### last_row mixed CI_DB_result::last_row(string $type) Returns the "last" row * Visibility: **public** #### Arguments * $type **string** ### next_row mixed CI_DB_result::next_row(string $type) Returns the "next" row * Visibility: **public** #### Arguments * $type **string** ### previous_row mixed CI_DB_result::previous_row(string $type) Returns the "previous" row * Visibility: **public** #### Arguments * $type **string** ### unbuffered_row mixed CI_DB_result::unbuffered_row(string $type) Returns an unbuffered row and move pointer to next row * Visibility: **public** #### Arguments * $type **string** - <p>'array', 'object' or a custom class name</p> ### num_fields integer CI_DB_result::num_fields() Number of fields in the result set Overridden by driver result classes. * Visibility: **public** ### list_fields array CI_DB_result::list_fields() Fetch Field Names Generates an array of column names. Overridden by driver result classes. * Visibility: **public** ### field_data array CI_DB_result::field_data() Field data Generates an array of objects containing field meta-data. Overridden by driver result classes. * Visibility: **public** ### free_result void CI_DB_result::free_result() Free the result Overridden by driver result classes. * Visibility: **public** ### data_seek 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** #### Arguments * $n **integer** ### _fetch_assoc array CI_DB_result::_fetch_assoc() Result - associative array Returns the result set as an array. Overridden by driver result classes. * Visibility: **protected** ### _fetch_object 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** #### Arguments * $class_name **string**