MY_DB_mysql_result Class
The MY_DB_mysql_result Class extends CI_DB_mysql_result result class. It adds several methods listed below:
result_assoc_array('field_name')
Returns an associative array with an array for rows.
$query = $this->examples_model->db->query(); $rows = $query->result_assoc_array('id');
result_assoc('field_name')
Returns an associative array with objects for rows
$query = $this->examples_model->db->query(); $rows = $query->result_assoc('id');