MySQL REPLACE statement incorrect? quot;A new statement was found, but no delimiterquot;(MySQL REPLACE 语句不对吗?“找到一条新语句,但没有分隔符)
问题描述
我正在尝试替换表字段中的子字符串,但 phpMyAdmin 说找到了一条新语句,但它与前一条语句之间没有分隔符'(REPLACE 附近)"我已经翻阅了文档,但没有发现我可以做什么的提示.此外,网络搜索不会产生有用的结果......
I'm trying to replace substrings in the fields of a table, but phpMyAdmin says "A new statement was found, but no delimiter between it and the previous one' (near REPLACE)" I've digged through the documentation, but found no hint on what I could do. Also, a web search doesn't yield helpful results...
我的声明:
update phpbb_users
SET user_avatar = REPLACE(user_avatar, 'http://', '//') WHERE user_avatar LIKE ('http://%');
我在尝试使用
update phpbb_posts
SET post_text = REPLACE(post_text, 'http://', '//') WHERE post_text LIKE ('http://');
推荐答案
这个 似乎是一个那个(过时的)phpMyAdmin 版本的错误;它至少在当前的 4.5.5.1 中得到修复,可能更早,但我没有进行广泛的测试以找到确切的时间.
This appears to have been a bug with that (outdated) phpMyAdmin version; it's fixed at least in the current 4.5.5.1, possibly earlier but I didn't test extensively to find when exactly.
这篇关于MySQL REPLACE 语句不对吗?“找到一条新语句,但没有分隔符"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL REPLACE 语句不对吗?“找到一条新语句,但没有分隔符"
基础教程推荐
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 在多列上分布任意行 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
