codeigniter 3 get data only one row code example
Example 1: codeigniter get num_rows
// num rows example
$this->db->select('*');
$this->db->where('whatever');
$query = $this->db->get('table');
$num = $query->num_rows();
Example 2: get single row in codeigniter
$query = $this->db->get();
$ret = $query->row();
return $ret->campaign_id;