Код: Выделить всё
function Dues_Paid_Tot($date)
{
$query = $this->db->select_sum('Dues_Paid', 'Dues_Paid_Tot');
$query = $this->db->get('Membership');
return $query->result();
}
< /code>
Вот контроллер < /p>
function Fiscal2()
{
$date = $this->input->post('Select_Date');
if($query = $this->report_model->fiscal_list($date))
{
$data['records'] = $query;
}
$data['date'] = $this->input->post('Select_Date');
$data['Dues_Paid_Tot'] = $this->report_model->Dues_Paid_Tot($date);
$data['main_content'] = 'report_fiscal_view';
$this->load->view('includes/template', $data);
}
< /code>
И это соответствующий код для представления: < /p>
Подробнее здесь: https://stackoverflow.com/questions/633 ... ord-method