title: Where to add the like clause in php?
body: <p>where can I put the like statement on this code? I would want to allow the user to search any documents that are similar to the entered text it would be document like '%$search%;</p>
  
  <pre><code>public function getDoc($param=''){
          if($this-&gt;User-&gt;PrincipalType!="All")$where['tbl_document.PrincipalType']=$this-&gt;User-&gt;PrincipalType;
          if(!isset($param['RecordID']) || $param['RecordID']==''){
              $where['tbl_document.Status !=']='Removed';
              $this-&gt;db-&gt;select('tbl_document.*,cr.FirstName,cr.MiddleName,cr.LastName,up.FirstName as UFName,up.MiddleName as UMName,up.LastName as ULName');
              $this-&gt;db-&gt;from('tbl_document');
              $this-&gt;db-&gt;join('tbl_user `cr`', 'tbl_document.CreatedBy = cr.ID','left');
              $this-&gt;db-&gt;join('tbl_user `up`', 'tbl_document.UpdatedBy = up.ID','left');
              if(isset($param['DocTrack']) &amp;&amp; $param['DocTrack']!='')         $where['tbl_document.ID']=$param['DocTrack'];
              $this-&gt;db-&gt;where($where);
              if(isset($param['DocTrack']) &amp;&amp; $param['DocTrack']!='')$this-&gt;db-&gt;or_where('tbl_document.Title',$param['DocTrack']);
  
              $this-&gt;db-&gt;order_by('DateCreated', 'desc');
              $query = $this-&gt;db-&gt;get();
              $return=$query-&gt;result();
          }
  </code></pre>