-1
這裏是我的控制器功能從控制器獲取和值以查看
function assignPartner($id){
$data['projects']=$this->admin_model->getProfData($id,'id','project')->result();
$data['partners']=$this->admin_model->getTableData('partner')->result();
$data['budge']=$this->db->query('SELECT SUM(amount) FROM budge WHERE project_id="'.$id.'"')->result();
//print_r($data);exit;
$this->load->view('projectheader',$data);
$this->load->view('assignpartner',$data);
$this->load->view('projectfooter');
}
這是我的看法頁
<?php echo $budge[0]->amount;?>