title: Use where clause with Like in codeigniter
body: <p>I am working on a project. I am implementing the Search functionality in my System.</p>
  
  <p>I will have to show the search record from two tables base on the current use login. I have tried the following code: </p>
  
  <pre><code>    function searchActivity($limit,$offset,$keyword1,$keyword2,$recruiter_id)
      {   
          $q=$this-&gt;db-&gt;select('*')-&gt;from('tbl_activity')-&gt;limit($limit,$offset);     
          $this-&gt;db-&gt;join('tbl_job', 'tbl_job.job_id = tbl_activity.job_id_fk', 'left outer');
          $this-&gt;db-&gt;order_by("activity_id", "ASC");          
          $this-&gt;db-&gt;like('job_title',$keyword1,'both');
          $this-&gt;db-&gt;or_like('job_title',$keyword2,'both');       
          $this-&gt;db-&gt;or_like('activity_subject',$keyword1,'both');
          $this-&gt;db-&gt;or_like('activity_subject',$keyword2,'both');        
          $this-&gt;db-&gt;or_like('activity_details',$keyword1,'both');
          $this-&gt;db-&gt;or_like('activity_details',$keyword2,'both');        
          $this-&gt;db-&gt;where('tbl_activity.recruiter_id_fk',$recruiter_id);             
          $ret['rows']=$q-&gt;get()-&gt;result();
  return $ret;
  }
  </code></pre>
  
  <p>I want to show search results based on the current user id, which is currently store in $recruiter.</p>
  
  <p>Thanks in advance.</p>