Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear all..before i give up after multiple trial and error attempts,can someone please help me with below query.

I am trying to replace the path name D:\Downloads\Music\ (note the slash) to http://mysite.com/Music/ in mysql field name called "filename" under "songlist" table.
Below is the query code that I tried with but nothing happens.It only gives me the following message : 0 row(s) affected. ( Query took 0.1428 sec )

UPDATE songlist SET filename = replace(filename, "D:\Downloads\Music", "http://mysite.com/Music/")

many thanks for the help!!!
Posted
Updated 30-Apr-11 16:38pm
v2

Double backslash: replace(filename, "D:\\Downloads\\Music", "http://mysite.com/Music/")
 
Share this answer
 
Comments
cheekycroak 2-May-11 4:12am    
Fantastic solution3!!! Thank you Kibab.It worked like a charm.
Many thanks to all those who responded.Below is the final code:
UPDATE songlist SET listen = replace(listen, "D:\\Downloads\\Music\\", "http://mysite.com/Music/")
uToLs 2-May-11 4:40am    
You're welcome.
Try putting @ before your text string paths.
 
Share this answer
 
Shouldn't be single quote(') instead of double quote(")?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900