[eluser]idealws[/eluser]
I am not sure if you have found a fix for this or not. I thought I was having the same issue
due to the profiler showing the results returned were 80295 which is the complete count for
the table I was running the query on. When in fact there is only 51 being returned which is the proper number.
However I came to find out it was working properly and the profiler is just reporting the wrong
information.
I am using CI 2.0 however which could have the fix for this issue already in it.
Here is what my code looks like:
Code:
$abbr = array('AA','AE','AP','AS','DC','FM','GU','MH','MP','PR','PW');
$this->db->where_not_in('stateabbr', $abbr);
$this->db->select('statename, stateabbr');
$this->db->distinct();
$this->db->order_by("stateabbr", "asc");
$query = $this->db->get('postalus');
if ($query->num_rows() >= 1){return $query->result();}else{return '0';};
return NULL;
Best Regards,
Ray