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 语句不对吗?“找到一条新语句,但没有分隔符"
基础教程推荐
- 无法解决整理冲突 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
