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 语句不对吗?“找到一条新语句,但没有分隔符"


基础教程推荐
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01