title: Searching using MySQL: How to escape wildcards
body: <p>I am currently searching my database with a query (using JDBC) like this:</p>
  
  <pre><code>"... AND LCASE(Items.Name) LIKE '%" + searchString.toLowerCase() + "%';"
  </code></pre>
  
  <p>Now, this is obviously very bad, because it allows for SQL injection as well as insertion of wildcard symbols such as % and _.</p>
  
  <p>My question is, how can I do a query such that even if the searchString contains any of these characters, they will be treated literally?</p>