title: Ignoring apostrophes in mysql searches
body: <p>I want to take a url that does not have any apostrophes, commas or ampersands in it and match it with a record in a database that may have one of those characters.</p>
  
  <p>For example:</p>
  
  <pre><code>mywebsite.com/bobs-big-boy
  mywebsite.com/tom--jerry
  mywebsite.com/one-two-three
  </code></pre>
  
  <p>rewrite to </p>
  
  <pre><code>index.php?name=bobs-big-boy
  index.php?name=tom--jerry
  index.php?name=bobs-big-boy
  </code></pre>
  
  <p>Then in php I want to use the $_GET['name'] to match the records</p>
  
  <pre><code>bob's big boy
  tom &amp; jerry
  one, two, three
  </code></pre>
  
  <p>Now my query looks like this:</p>
  
  <pre><code>"SELECT * from the_records WHERE name=$NAME";
  </code></pre>
  
  <p>I can't change the records, because they're business names.  Is there a way I can write the query to ignore ampersands, commas and apostrophes in the db?</p>