I\'m very new to CodeIgniter and Active Record in particular, I know how to do this well in normal SQL but I\'m trying to learn.
How can I select some data from one
$this->db->select('count(id) as rows'); $this->db->from('table_name'); $this->db->where('active',1); $query = $this->db->get(); foreach($query->result() as $r) { return $r->rows; }