我正在尝试在MYSQL中搜索和替换,但出现错误。我要问的是因为“ http://”
有人尝试更换这种东西时有任何建议吗?
输入的代码:
update movies_news set select_page = replace(select_page, ‘http://movie’, ‘http://www.movie’);
但这会引发以下错误:
#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 '://movie’, ‘http://www.movie’)' at line 1
最佳答案
发布,因此可以接受:update movies_news set select_page = replace(select_page, ‘http://movie’, ‘http://www.movie’);
包含智能引号,这些引号不解释为普通的单引号,因此语法错误。它应该是update movies_news set select_page = replace(select_page, 'http://movie', 'http://www.movie');
通常,在与“智能”文本编辑器(Microsoft Word等)之间来回复制代码时要格外小心
关于mysql - 涉及“http://”时,MySQL搜索和替换,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16727257/