Это моя база данных, в которой я хочу посчитать итоговую сумму
$this->db->select('*');
$this->db->select_sum('total_sale');
$query = $this->db->get('one_month_report');
if ($query->num_rows() > 0) {
return $query->result();
} else {
return FALSE;
}
}
Подробнее здесь: https://stackoverflow.com/questions/370 ... sing-mysql