title: Can't seem to escape character from PHP and MySQL
body: <p>In my PHP - Codeigniter function(), I gave the following command:</p>
  
  <pre><code>function get_cust($search='David')
  {
  $query = 'select pp.first_name from Cust pp where'; 
  $query .= ' pp.first_name LIKE "%'.$search.'%")';
  print_r(mysql_real_escape_string($query));
  }
  </code></pre>
  
  <p>But while i executed the output in browser:</p>
  
  <pre><code>select pp.first_name from Cust pp where pp.first_name LIKE 'Úvid%'
  </code></pre>
  
  <p>Is it anyway so i can get it like:</p>
  
  <pre><code>select pp.first_name from Cust pp where pp.first_name LIKE '%David%'
  </code></pre>
  
  <p>I have tried using <code>addslashes()</code>, <code>mysql_real_escape_string()</code> as well.</p>