使用html内容进行SQL更新

时间:2020-03-17 22:33:11

标签: html mysql sql-update mysql-error-1064

我需要搜索并替换表中的内容:

搜索值:

<div class="row"><br /><br /><br />
<h4 style="color: #ff0000;">-&gt; text</h4><div><br /><div class="col-lg-7 col-md-7 col-sm-12 col-xs-12 col-sp-12">

我尝试过这样的事情:

 UPDATE product_lang SET description = REPLACE (  description,  '<div class="row"><br /><br /><br />
    <h4 style="color: #ff0000;">-&gt; text</h4><div><br /><div class="col-lg-7 col-md-7 col-sm-12 col-xs-12 col-sp-12">',  'replace text');

但是它不起作用

MySQL表示:文档

1064-您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,以在'UPDATE product_lang SET description = REPLACE(description,'

0 个答案:

没有答案
相关问题