Get Result Count Codeigniter

[Solved] Get Result Count Codeigniter | Php - Code Explorer | yomemimo.com
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

Question : codeigniter count rows

Answered by : matteo-puppis

$this->db ->where(['field'=>'foo']) ->from("tablename") ->count_all_results();
//OR
$this->db ->where(['field'=>'foo']) ->count_all_results("tablename");

Source : | Last Update : Fri, 28 Feb 20

Answers related to get result count codeigniter

Code Explorer Popular Question For Php