title: MySQL query : search keyword like %
body: <p>I was trying to query a database table by search keyword. My SQL is as follow:</p>
  
  <pre><code>SELECT * FROM some_table WHERE some_name LIKE '%$keyword%'
  </code></pre>
  
  <p>where $keyword is from PHP form POST data. The $keyword is already processed by <code>real_escape_string</code> function. I notice that it the $keyword is <strong>%</strong>, all records are selected. How can I search for the <code>some_name</code> field with <strong>%</strong> in the content?</p>