Kmspico Download | Official KMS Activator Website [New Version 2024] Uw betrouwbare online apotheek Drogisterij Unique in Nederland Vavada вход позволяет мгновенно попасть в мир азартных игр и бонусов! Получи доступ и начни выигрывать прямо сейчас.

Count Query Codeigniter

“Codeigniter Use Count Query, Count Query use With Codeigniter,How to Use Count Query in Codeigniter, Count Query use With Where Condition”

In Codeigniter, Count query is used to count the total rows of the table. How to use this query can be seen below.

In Example :- If you have 20 comments in your comments table and you want to count all the comments of user_id 2. Then count of query will be written in this way.

Count Query Use In Codeigniter

$this->db->select('count(*)');
$this->db->from('comments');
$this->db->where('user_id','2');
$query = $this->db->get();

echo $query->num_rows();