title: How to search for multiple values in a single field of mysql table using codeigniter active record?
body: <p>I have to search for multiple values in a field using mysql in codeigniter. Here follows my code.</p>
  
  <p><strong>In Controller</strong></p>
  
  <pre><code>public function vpsearch()
  {
    $data['info'] = $this-&gt;psearch_m-&gt;emp_search_form();
  
    $this-&gt;load-&gt;view("employer/result",$data);       
  
  }
  </code></pre>
  
  <p><strong>IN Model</strong> </p>
  
  <pre><code>public function emp_search_form()
  {
    $skill = $this-&gt;security-&gt;xss_clean($this-&gt;input-&gt;post('ps_skills'));
    $jrole = $this-&gt;input-&gt;post('ps_jobrole'));
  
  
    if ( $jrole !== NULL) 
    {
      return $this-&gt;db-&gt;get('js_edu_details');
      $this-&gt;db-&gt;like('js_skills','$skill');
    }
  }
  </code></pre>
  
  <p><strong>In view</strong> i.e, (../employer/result)</p>
  
  <pre><code>foreach($info-&gt;result() as $row)
  {
    echo $row-&gt;js_id."&lt;br/&gt;&lt;br/&gt;" ;
  }
  </code></pre>
  
  <p>However I am getting all the records in 'js_edu_details' table instead of fields having searched 'skills'.</p>
  
  <p>Where I am going wrong? Any help wud b appreciated, thanx in advance. </p>