Codeigniter请求
$this->db->select('visites.id, persons.fio, sum(services.cena)');
$this->db->from('visites');
$this->db->join('persons', 'visites.clients = persons.id', 'inner');
$this->db->join('draft', 'draft.vis = visites.id', 'inner');
$this->db->join('services', 'draft.ser = services.id', 'inner');
$this->db->group_by(array("visites.id, persons.fio"));
if($_POST['length'] != -1)
$this->db->limit($_POST['length'], $_POST['start']);
$query = $this->db->get();
return $query->result();
答案 0 :(得分:0)
您的意思是"传递数据以查看" ?
控制器
$data['list'] = $this->your_model->fn();
$this->load->view("your_view",$data);
查看
<?php print_r($list); ?>
答案 1 :(得分:0)
{{1}}