|
在模型里面
function get_series($category_id)
{
$query = $this->db->get_where('series',array('category_id' => $category_id));
return $query->result();
}
function get_series_id($series_id)
{
$query = $this->db->get_where('series',array('series_id' => $series_id));
$row = $query->row();
return $this->Mhome->get_series($row->category_id);
}
在方法里面
$this->load->model('Mhome'); $data['page_series']=$this->Mhome->get_series_id($this->uri->segment(3));$this->load->view('series',$data);到底那里错了啊。。。
|
|