title: Filtering and searching in codeigniter
body: <p>I am doing a <code>filtering</code> and <code>searching</code> in codeigniter but no idea! how to do that?</p>
  <p>but i try my best but fail!!!</p>
  <p>here i show the list which is shown by ajax that sucess</p>
  <p><a href="https://i.stack.imgur.com/ZCJ7Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZCJ7Z.png" alt="enter image description here" /></a></p>
  <p><strong>MY DATA BASE ARE</strong></p>
  <p><a href="https://i.stack.imgur.com/WqIWD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WqIWD.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/xpmKv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xpmKv.png" alt="enter image description here" /></a></p>
  <p><strong>MY CONTROLLER IS</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  public function get_quick_search() 
  {
          $sepcli= $this-&gt;input-&gt;post('spec');
          $distct= $this-&gt;input-&gt;post('dist');
          $locat= $this-&gt;input-&gt;post('locat');
           $data['list'] = $this-&gt;Doctor_model-&gt;search_listing();
          $data['quck_search'] = $this-&gt;search_model-&gt;get_quick_list($sepcli,$distct,$locat);
          $data['get_specs'] = $this-&gt;specialisation_model-&gt;get_specialisation();
          $this-&gt;load-&gt;helper(array('form', 'url'));
          $this-&gt;load-&gt;view('customer/header');
          $this-&gt;load-&gt;view('customer/side_view',$data);
          $this-&gt;load-&gt;view('customer/quick_search',$data);
          $this-&gt;load-&gt;view('customer/footer');
  }</code></pre>
  </div>
  </div>
  </p>
  <p><strong>MY MODEL LIKE</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> public  function get_quick_list($locat,$distct,$sepcli)  
  {  
      $this-&gt;db-&gt;select('*');    
          $this-&gt;db-&gt;from('tbl_doctor');  
          $this-&gt;db-&gt;join("tbl_specialisation", "tbl_specialisation.spec_id = tbl_doctor.spec_id",'left');
  
          $this-&gt;db-&gt;where("(district LIKE '$distct' AND place LIKE '$locat' AND spec_specialise LIKE '$sepcli')");
  
      $query=$this-&gt;db-&gt;get()-&gt;result_array(); 
  
   
            return $query;
  }</code></pre>
  </div>
  </div>
  </p>
  <p>HERE NO ERROR SHOW BUT THE RETURN QUERY IS <code>NULL</code> SHOW LIKE THIS <code>(array(0) { })</code></p>