I have the following query in codeigniter
The idea is to only get distinct rows – the column I want to use this on is called club_id – any ideas how to do this in codeigniter so only one offer shows per club_id?
$this->db->distinct();
$this->db->limit($limit);
$this->db->where("UNIX_TIMESTAMP(`end_date`) > ".time());
$q = $this->db->get('offers');
Just add the column in the select method like the following