title: Sort SQL ORDER BY query without slashes in front of escaped characters
body: <p>I am trying to figure out how to sort an SQL query by Last Name.  This is working except in the case of where a customers last name has a special character.</p>
  
  <p>For example O'Maley.</p>
  
  <p>If this last name is sorted with a last name of "Omar" for example the order should be:</p>
  
  <p>O'Maley
  Omar</p>
  
  <p>BUT since I use addslashes() in PHP before adding it into the database the sort is actually happening on O\'Maley and so the sort ends up being.</p>
  
  <p>Omar
  O'Maley</p>
  
  <p>Of course the \ is removed with stripslashes() before being displayed to the user.</p>
  
  <p>How can I make this properly sort?</p>