title: codeigniter search
body: <p>hello i have little problem</p>
  
  <p>i want search in mysql by name</p>
  
  <p>i have this code in search model</p>
  
  <pre><code> $this-&gt;db-&gt;limit($limit, $start);
          $this-&gt;db-&gt;like("name",$by);    
          $res = $this-&gt;db-&gt;get('walls');
              if ($res-&gt;num_rows() &gt; 0)
                  return $res-&gt;result();
  </code></pre>
  
  <p>result for $by = "megan"; is working</p>
  
  <p>but when $by = "megan fox"; is not working</p>
  
  <p>in mysql name i have "megan fox";</p>
  
  <p>I tried urldecode but to no avail.</p>
  
  <p>i using codeigniter framework..</p>
  
  <p>any ideas?</p>