MySQL REPLACE 语句不对吗?“找到一条新语句,但没有分隔符"

MySQL REPLACE statement incorrect? quot;A new statement was found, but no delimiterquot;(MySQL REPLACE 语句不对吗?“找到一条新语句,但没有分隔符)
本文介绍了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 语句不对吗?“找到一条新语句,但没有分隔符"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)