Alright, Im trying to count all the rows where "Membership_Status" = Active. The result I get right now is "Array" instead of a number.
Here is my model
class Report_model extends Model { function count_members() { $query = $this->db->get_where('Membership', array('Membership_Status' => 'Active')); return $query->num_rows(); } }
Here is my controller
class Report extends Controller { function YTD_report() { $data['main_content'] = 'report_membership_view'; $this->load->view('includes/template', $data); } }
Here is my view
report_model->count_members(); echo $total; ?>
My result is Array, where according to the db info, it should be 4.
What can I do/change to get it to display the proper number?
thanks