Problem with mysql query to replace a string

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 1:31 UTC
Read the original article Hit count: 282

Filed under:
|
|

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.

Here's what I'm trying to do:

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

Related posts about sql

Related posts about mysql