多個搜索我做的代碼點火器多個搜索列表中顯示三個選擇框 專業化,區,將充分上市,成功在笨
爲MyModel
public function get_quick_list($locat,$distct,$sepcli)
{
$this->db->select('*');
$this->db->from('tbl_doctor');
$this->db->join("tbl_specialisation", "tbl_specialisation.spec_id = tbl_doctor.spec_id",'left');
$this->db->where("(district LIKE '$distct' AND place LIKE '$locat' AND spec_specialise LIKE '$sepcli')");
$query=$this->db->get()->result_array();
var_dump($query);die();
return $query;
}
我控制器
public function get_quick_search()
{
$sepcli= $this->input->post('spec');
$distct= $this->input->post('dist');
$locat= $this->input->post('locat');
$data['list'] = $this->Doctor_model->search_listing();
$data['quck_search'] = $this->search_model->get_quick_list($sepcli,$distct,$locat);
$data['get_specs'] = $this->specialisation_model->get_specialisation();
$this->load->helper(array('form', 'url'));
$this->load->view('customer/header');
$this->load->view('customer/side_view',$data);
$this->load->view('customer/quick_search',$data);
$this->load->view('customer/footer');
}
返回查詢show null v ALUE
這是重複的問題問了兩遍!我也爲它提供瞭解決方案。這裏的鏈接,如果我錯了 http://stackoverflow.com/questions/40902542/filtering-and-search-in-code-igniter?noredirect=1#comment69152055_40902542 –