title: MySQL select where like path
body: <p>Setting a wordpress project to its staging environment, I have ran into an issue regarding paths that were set for the development environment, and don't fit the ones in staging.</p>
  
  <p>So I need to update the paths in the database, from <code>C:\xampp\htdocs\site.com</code> to <code>/var/www/site.com</code></p>
  
  <p>At first, I tried replacing, the same way I replaced the urls:</p>
  
  <pre><code>update `wp_slider` set `url` = replace(`url`, 'http://local.', 'http://');
  </code></pre>
  
  <p>Then the paths:</p>
  
  <pre><code>update `wp_slider` set `path` = replace(`path`, 'C:\xampp\htdocs\site.com', '/var/www/site.com');
  </code></pre>
  
  <p>Which actually didn't work. Then I tried a <code>SELECT</code> to see what rows can I retrieve:</p>
  
  <pre><code>SELECT * FROM `wp_slider` WHERE `path` LIKE "%C:\xampp\htdocs\site.com%"
  </code></pre>
  
  <p>Which will return an empty result. What am I missing?</p>
  
  <p>Forgot to mention, that I tried escaping the <code>\</code> by doing <code>\\</code> and I still get no result</p>
  
  <p>A full path of what I'm trying to replace would be like: <code>C:\xampp\htdocs\site.com/wp-content/plugins/slider/skins/slider\circle\circle.css</code></p>