1$this->db->where('EmpID >=', 5);
2$query = $this->db->get('Employees');
3echo $query->num_rows();
4
5// Outputs, 4
6
1$this->db
2 ->where(['field'=>'foo'])
3 ->from("tablename")
4 ->count_all_results();
5
6//OR
7$this->db
8 ->where(['field'=>'foo'])
9 ->count_all_results("tablename");