am getting an error of array to string conversion.this is my control
public function report()
{
$from=$this->input->post('from_date');
$to = $this->input->post('to_date');
$data['result']= $this->Account_model->get_report($from,$to)->result();
$data['total'] = $total= $this->Account_model->get_total_amount($from,$to)->result();
var_dump($total);
$this->load->view('report_payment_details',$data);
}
this is my model
public function get_total_amount($from,$to)
{
$this->db->join('payment','payment.order_id=services.id','left');
$this->db->select('services.id,sum(payment.actual_amount) as total_amount');
$this->db->join('customer','customer.id=services.customer_id');
$this->db->order_by('services.id','desc');
$this->db->where('date >=', $from);
$this->db->where('date <=', $to);
return $this->db->get('services');
this is my view
<td><?php echo $total; ?></td>
here i want to get the total amount with in two dates but getting error of array to string conversion