April 30, 2015
MySQL替换函数REPLACE替换字符串方法
在网站搬家、更换域名的时候,Drupal和Wordpress都是用的MySQL的数据库,很多配置信息是写在MySQL数据库里面的。我们需要将数据库里面的相关配置信息替换成新空间或域名的信息。这时我们就要用到MySQL的字符串替换函数Replace了。
MySQL Replace 替换函数语法:
update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, "find this string", "replace found string with this string");
Replace 替换函数案例:
update client_table set url = replace(url, "py… Read More