mysql replace matching but not changing
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-05-26T00:42:55Z
Indexed on
2010/05/26
0:51 UTC
Read the original article
Hit count: 234
I've used mysql's update replace function before, but even though I think I'm following the same syntax, I can't get this to work-it matches the rows, but doesn't replace.
Here's what I'm trying to do:
mysql> update contained_widgets set preference_values = replace(preference_values, '<li><a_href="/enewsletter"><span class="not-tc">eNewsletter</span></a></li>', '<li><a_href="/enewsletter"><span class="not-tc">eNewsletter</span></a></li> <li> <a_href="/projects"><span class="not-tc">Projects</span></a></li>');
Query OK, 0 rows affected (0.00 sec)
Rows matched: 77 Changed: 0 Warnings: 0
I don't see what I'm missing.
Any help is appreciated.
I edited "a " to "a_" because the site thinks I'm posting spam links otherwise.
© Stack Overflow or respective owner