N
N
nethero2015-03-23 18:23:45
CodeIgniter
nethero, 2015-03-23 18:23:45

How to add numbers from cells?

How to count numbers from amount in cms_operations table?
and display in the
Model view

function getBalanceByID()
    {
    $this->db->select_sum('amount');
    $query = $this->db->get('cms_operations');
    return $query->result();
    }

Controller
public function index()
  {
    $this->load->view('v_header');
    
    $this->load->model('mdl_billing');
    $data['query'] = $this->mdl_billing->getBalanceByID();
    $this->load->view('v_billing', $data);
  
    $this->load->view('v_billing');
    $this->load->view('v_footer');
  }

view
????

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question