Davina Davina - 1 year ago 99
MySQL Question

Delete some characters from mysql row

I need to delete

from the field
in my table
but the query doesn't work

UPDATE `new` SET `photo`=REPLACE(`photo`,'~\New\','')

Answer Source

You need escape '\' by adding additional '\'

UPDATE `new` SET `photo`=REPLACE(`photo`,'~\\NewFolder\\','')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download