I have a database which I want to export to CSV
File.
In one of the fields ringPics, I have values as
"abc.png,zxc.png"
Now when I export to CSV it mix up columns.
Since the database is very big , i can't replace ,
manually.
I want to do something like this replace ,
with /\
What changes need to be done with below query
UPDATE `rings` SET `ringPicDir`= REPLACE("ringPicDir", ',', '/\')
try this
UPDATE `rings` SET `ringPicDir`= REPLACE( ringPicDir, ',', '/\')
^^^---no quotes here , you can use backticks also
or this
UPDATE `rings` SET `ringPicDir` = if (ringPicDir Like '%,%' , REPLACE( ringPicDir, ',', '/\'), ringPicDir)