code igniter 3 result count rows code example
Example: codeigniter count rows
$this->db
->where(['field'=>'foo'])
->from("tablename")
->count_all_results();
//OR
$this->db
->where(['field'=>'foo'])
->count_all_results("tablename");
$this->db
->where(['field'=>'foo'])
->from("tablename")
->count_all_results();
//OR
$this->db
->where(['field'=>'foo'])
->count_all_results("tablename");