测试了OK,但是有个问题,我其他产品不需要添加的也添加上去了,只需要有 <img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt=""> 这行字符的后面添加,没有的就很不添加,有没有好的方法? 感激使用like判断,sql如下: UPDATE tablename1 SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
用%%无法使用到索引 UPDATE ttt SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">
这行字符的后面添加,没有的就很不添加,有没有好的方法?
感激
<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">
这行字符的后面添加,没有的就很不添加,有没有好的方法?
感激使用like判断,sql如下:
UPDATE tablename1 SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
UPDATE ttt SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
可以再添加另外一个字段datetime,利用datetime来建立索引,这样效率就会提升一些。