try this
function detailsCustomer($id){
$this->db->where('ID', $id);
$query = $this->db->get('customers');
return $query->result();
}
you misdeed to add return $query->result();
also in view
change
<td><a href='http://localhost/CRM/customers/details/<?php echo $id;?>' type='button' class='btn btn-info'>Details</a></td>
into
<td><a href='http://localhost/CRM/customers/details/<?php echo $row->id;?>' type='button' class='btn btn-info'>Details</a></td>