num rows affected in codeigniter code example
Example 1: codeigniter check affected rows
return $this->db->affected_rows() > 0;
Example 2: codeigniter get num_rows
// num rows example
$this->db->select('*');
$this->db->where('whatever');
$query = $this->db->get('table');
$num = $query->num_rows();