MySQL搜索和替换语法错误 [英] MySQL search and replace syntax error
问题描述
我有以下查询,并收到以下错误消息:
I have the following query and get the below error message:
update `wp_posts` set `post_excerpt` = replace( `post_excerpt`, "[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' color='' custom_class=''][/av_font_icon]", '') where instr( `post_excerpt`, "[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' color='' custom_class=''][/av_font_icon]") > 0;
#1064-您的SQL语法有错误;检查手册 对应于您的MySQL服务器版本以使用正确的语法 靠近'"[av_font_icon icon ='ue82d'font ='entypo-fontello'size ='14px' 第1行的position ='left'c'
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' c' at line 1
我正在尝试在我的wordpress数据库中查找简码并将其删除.有人知道哪里出问题了吗?非常感谢
I am trying to find the shortcode within my wordpress database and remove it. Does anyone know what is wrong? many thanks
推荐答案
为什么不使用"PHP中的数据库搜索和替换脚本"?您所要做的只是将其放置在根文件夹中,然后在浏览器中运行它. https://interconnectit.com/products/search-and-replace- for-wordpress-databases/
Why don't you use the "Database Search And Replace Script In PHP"? All you have to do is place it in the root folder and run it in your browser. https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
这就是我所使用的,并且从未遇到过问题.只要确保进行备份以防万一.
That's what I use and have never had a problem. Just make sure to make a back up just in case.
搜索短代码,然后将其替换为空字段.
Run a search for the short code and replace it with an empty field.
这篇关于MySQL搜索和替换语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!