I\'m very new to CodeIgniter and Active Record in particular, I know how to do this well in normal SQL but I\'m trying to learn.
How can I select some data from one
$sql = "SELECT count(id) as value FROM your_table WHERE your_field = ?"; $your_count = $this->db->query($sql, array($your_field))->row(0)->value; echo $your_count;