替换mysql查询中的文本
我需要从 mysql 数据更新一些数据:
表名:wp_postmeta
| meta_id | post_id | meta_key | meta_value |
+-----------+-----------+------------+------------------------------+
| 1 | 1 | _meta_url | http://domain.com/image1.jpg |
如何将所有 meta_keys _meta_url
的域库替换为另一个域,例如:http://newdomain.com/path/image1 .jpg
I need to update some data from mysql data:
Table name: wp_postmeta
| meta_id | post_id | meta_key | meta_value |
+-----------+-----------+------------+------------------------------+
| 1 | 1 | _meta_url | http://domain.com/image1.jpg |
how I can replace domain base for all meta_keys _meta_url
to another domain like: http://newdomain.com/path/image1.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
replace()
函数:语法如下:
replace([field_name],'[string_to_find]','[string_to_replace]')
Use
replace()
function:Here is syntax :
replace([field_name],'[string_to_find]','[string_to_replace]')
使用
替换
字符串函数。Use
replace
string function.