Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL REPLACE statement incorrect? "A new statement was found, but no delimiter"

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...

My statement:

update phpbb_users
SET user_avatar = REPLACE(user_avatar, 'http://', '//') WHERE user_avatar LIKE ('http://%');

I get a similar error message when trying it with

update phpbb_posts
SET post_text = REPLACE(post_text, 'http://', '//') WHERE post_text LIKE ('http://');
like image 980
richey Avatar asked Sep 25 '22 06:09

richey


1 Answers

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.

like image 116
Isaac Bennetch Avatar answered Oct 18 '22 12:10

Isaac Bennetch