title: Need to select only data that contains backslashes in MySQL
body: <p>I'm attempting to correct entries in a database that have been double-escaped.  I believe magic_quotes was on while mysql_real_escape_string was being used.  The double-escaping has caused some search results to be incorrect/missing.</p>
  
  <p>I've turned magic_quotes off and am planning to search for entries with a backslash and update them to remove any double-escaping. Trouble is, when I perform a query to search for entries with backslashes, I always get no results.</p>
  
  <pre><code>SELECT title FROM exampletable WHERE title LIKE '%\\\\%'
  </code></pre>
  
  <p>I'm using '%\\\\%' as recommended here: <a href="http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like" rel="noreferrer">http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like</a></p>
  
  <p>If I output every title, many of them have unwanted backslashes, so I know they're there.  I just can't seem to isolate them in a query.</p>
  
  <pre><code>Example Data:
  Old King\'s Road
  Running Down A Dream
  Can\'t Stop The Sun
  This One's For Me
  </code></pre>
  
  <p>Again, just trying to return entries with a \ in them.</p>
  
  <hr>
  
  <p>EDIT: MySQL version is 5.0.92-community.  Collation is latin1_swedish_ci.  Charset is UTF-8 Unicode</p>
  
  <p>%\\% does NOT work. I've tried.  It is listed as incorrect on mysql.com:</p>
  
  <blockquote>
    <p>To search for “\”, specify it as “\\\\”; this is because the backslashes are stripped once by the parser and again when the pattern match is made, leaving a single backslash to be matched against.</p>
  </blockquote>