codeigniter get num_rows
snippet in php

codeigniter get num_rows

user9169

// num rows example
$this->db->select('*');
$this->db->where('whatever');
$query = $this->db->get('table');
$num = $query->num_rows();