php - Is it possible to count all with where condition in codeiginter? -


i trying this

$this->db->count_all("grant_money")->where('id',5); 

is possible ?

if there way please let me know.thanks

i want query in single line code tried above

you can use this.

$this->db->where('id',5); $this->db->from("grant_money"); echo $this->db->count_all_results(); 

this show count condition.

with single line try this

echo $this->db->where('id',5)->from("grant_money")->count_all_results(); 

Comments

Popular posts from this blog

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -