Question : row count in codeigniter
Answered by : rich-rhinoceros-v28rvqt49doj
$this->db->where('EmpID >=', 5);
$query = $this->db->get('Employees');
echo $query->num_rows();
// Outputs, 4
Source : https://www.kodingmadesimple.com/2016/08/codeigniter-count-query-results-number-of-rows-in-table.html | Last Update : Sun, 03 Jan 21
Question : count all results codeigniter
Answered by : difficult-dormouse-jzjf2qw7on1u
$this->db->select('id');
$this->db->from('table');
$this->db->where($your_conditions);
$num_results = $this->db->count_all_results();
Source : https://stackoverflow.com/questions/14204691/codeigniter-count-all-results | Last Update : Tue, 26 May 20
Question : get result count codeigniter
Answered by :
public function record_count() { return $this->db->count_all("tablename");
}
Source : | Last Update : Mon, 09 Nov 20