MySQL select where like path

admin

Administrator
Staff member
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.

So I need to update the paths in the database, from
Code:
C:\xampp\htdocs\site.com
to
Code:
/var/www/site.com

At first, I tried replacing, the same way I replaced the urls:

Code:
update `wp_slider` set `url` = replace(`url`, 'http://local.', 'http://');

Then the paths:

Code:
update `wp_slider` set `path` = replace(`path`, 'C:\xampp\htdocs\site.com', '/var/www/site.com');

Which actually didn't work. Then I tried a
Code:
SELECT
to see what rows can I retrieve:

Code:
SELECT * FROM `wp_slider` WHERE `path` LIKE "%C:\xampp\htdocs\site.com%"

Which will return an empty result. What am I missing?

Forgot to mention, that I tried escaping the
Code:
\
by doing
Code:
\\
and I still get no result

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