需要被替换的关键字为
<h4 class=\"subt\">我用
update 'news' set newstext=replace(newstext,'<h4 class=\"subt\">','')出错:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''phome_ecms_news' set newstext=replace(newstext,'<h4 class=\"subt\">','')' at line 1
<h4 class=\"subt\">我用
update 'news' set newstext=replace(newstext,'<h4 class=\"subt\">','')出错:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''phome_ecms_news' set newstext=replace(newstext,'<h4 class=\"subt\">','')' at line 1
+----------------------+
| newstext |
+----------------------+
| <h4 class="subt"ring |
+----------------------+
1 row in set (0.01 sec)
mysql> update news set newstext=replace(newstext,"<h4 class=\"subt\"",'');
Query OK, 1 row affected (0.03 sec)
Rows matched: 1 Changed: 1 Warnings: 0mysql> select * from news;
+----------+
| newstext |
+----------+
| ring |
+----------+
1 row in set (0.00 sec)
你所改表 news