title: Codeigniter: Weird behaviour of $this->db->like()
body: <p>I've written a simple query for searching a keyword in the database.</p>
  
  <pre><code>$keyword = "keyword sample"; 
  $keyword = str_replace(" ", "%", $keyword);   
  
  $this-&gt;db-&gt;select('*')-&gt;from('table')
             -&gt;like('column', "%".$keyword."%")-&gt;get();
  </code></pre>
  
  <p>Now the query generated by Codeigniter is like this:</p>
  
  <pre><code>SELECT * FROM (`table`) WHERE `column` LIKE '%keyword\%sample%'
  </code></pre>
  
  <p>Where is the trailing <code>\</code> coming from in the query? This is making an erroneous search and not returning the data that is actually in the db. I've checked everything and nothing seems to be wrong with the code I've written. Please help!</p>