codeigniter distinct 1

codeigniter distinct

db->distinct();
$this->db->select('accessid');
$this->db->where('record', $record); 
$query = $this->db->get('accesslog');

Here is what the above code is Doing:
1. Selecting the accessid column from the accesslog table
2. Where the record column is equal to the record variable
3. Distinctly
4. Getting the results

Similar Posts