title: Codigniter like query with or instead of and
body: <p>below is my CI controller code to add multiple like in a query:</p>
  
  <pre><code>           $this-&gt;load-&gt;library('pagination');
              $currPage = ($this-&gt;uri-&gt;segment(4)) ? $this-&gt;uri-&gt;segment(4) : "" ;
              $config['per_page'] = 7;
              if($currPage&lt;2)
                      $currPage = "";   
  
              //search
              $prjSearch = ($this-&gt;uri-&gt;segment(3)) ? $this-&gt;uri-&gt;segment(3) : "" ;
              if($prjSearch != "") {
                  $this-&gt;db-&gt;like('projectName', $prjSearch, 'after');
                  $this-&gt;db-&gt;like('projectName', $prjSearch, 'after');
                  $this-&gt;db-&gt;like('projectName', $prjSearch, 'after');
              }
              $config['base_url'] = $this-&gt;config-&gt;site_url()."project/index/".$prjSearch."/"; 
  
              $this-&gt;db-&gt;select("project.*");     
              $query = $this-&gt;db-&gt;get('project',$config['per_page'],$currPage);
              $data['data'] = $query-&gt;result();
              echo $this-&gt;db-&gt;last_query();
              $config['cur_page'] = $data['cur_page'] = $currPage;
              $config['uri_segment'] = 4;
              //total count
              if($prjSearch != "") 
                  $this-&gt;db-&gt;like('projectName', $prjSearch, 'after');            
              $query = $this-&gt;db-&gt;get('project');
              $config['total_rows'] = $query-&gt;num_rows();
  
              $this-&gt;pagination-&gt;initialize($config);
  </code></pre>
  
  <p>It generate below result:</p>
  
  <pre><code>SELECT `project`.* FROM (`project`) WHERE `projectName` LIKE 'kesh%' AND `projectName` LIKE 'kesh%' AND `projectName` LIKE 'kesh%' LIMIT 7
  </code></pre>
  
  <p>instead of "AND" between like i need to have "OR".</p>
  
  <p>I dont want to use <code>$this-&gt;db-&gt;query();</code> as pagination will become complex or not supported by CI
  Any help appreciated.</p>