[英]Using preg_replace in mysql
I have a CMS content in database. 我的数据库中有CMS内容。 The content contains
'<img src= .............../>'
also. 内容还包含
'<img src= .............../>'
。 I want to retrieve this content using mysql query and show on frontend but with all '<img src='.........../>'
removed from the content. 我想使用mysql查询检索此内容,并在前端显示,但从内容中删除了所有的
'<img src='.........../>'
。
How can it be done using query in mysql? 如何在mysql中使用查询来完成?
Once you install lib_mysqludf_preg you'll be able to use various regex functions in MySQL. 一旦安装了lib_mysqludf_preg ,就可以在MySQL中使用各种正则表达式函数。 See the docs on that page to find out more about them.
请参阅该页面上的文档以了解有关它们的更多信息。
DISCLAIMER: I have not used this package and will not guarantee that it won't do anything to the server. 免责声明:我没有使用过这个软件包,也不能保证它不会对服务器产生任何影响。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.