-
SitePoint Zealot

Problem searching and replacing ' \ '
Hi
I have a problem searching and replacing paths in my database:
I want to change all paths from : \new\new1\new2\image.jpg
to: /new/new1/new2/image.jpg
I am trying the following SQL statement but it doesn't work.
code:
update menu set image = replace(image, "\", "/");
What am I doing wrong???
-
replace(image, "\\", "/")
-
SitePoint Enthusiast
UPDATE table SET field=REPLACE(table.field, '\\','/');
-
SitePoint Zealot

excellent, works!
many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks