tags:

views:

58

answers:

1

I just asked this question, but failed to specify that I would like to get the number of fields that actually have a value. I need to know how many fields have something in them, so I can get a percentage of filled out fields per user.

A: 
    $data['member'] = $this->model->getUser($id); 

    $query = $this->db->where('user_id', $id)->get('user_profiles');
    $data['results'] = count((array) $query);
Kevin Brown