SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Hybrid View
-
Dec 1, 2008, 11:39 #1
- Join Date
- Jun 2007
- Location
- London, United Kingdom
- Posts
- 102
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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???
-
Dec 1, 2008, 12:44 #2
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
replace(image, "\\", "/")
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Dec 1, 2008, 12:45 #3
- Join Date
- Sep 2006
- Posts
- 76
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
UPDATE table SET field=REPLACE(table.field, '\\','/');
-
Dec 1, 2008, 13:28 #4
- Join Date
- Jun 2007
- Location
- London, United Kingdom
- Posts
- 102
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
excellent, works!
many thanks
Bookmarks