[eluser]snowstar[/eluser]
I used the follow method to fix the solution
Code:
$query = 'SELECT `totalprice`, `date`
FROM `crm_sales`
WHERE `date` BETWEEN '.$this->db->escape($start).' AND '.$this->db->escape($end).'
ORDER BY `date` ASC';
$data = $this->db->query($query);
return $data->result();
Was not able to figure out how to do the query with active records