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

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -