Hi folks,
I'm looking for a script (php or sql) to search for a character in a field of all the reccord of a MySQL table, and to replace it by an other character. I hope I'm clear enough. If not, please ask me for more details 😉
Thanx,
Loïc
mysql has a replace() string function. see http://www.mysql.com/doc/en/String_functions.html
You could do something like this: UPDATE tbl.myfield SET myfield=REPLACE(myfield,'r','s')
So if you had this table:
rob roy rarer
After running the query it would look like this:
sob soy sases
I'll try this...
Thanx a lot! 😉
OK, it worked with:
UPDATE tbl SET myfield=REPLACE(myfield,'r','s')
Thanx again! 🙂