A5下载文章资讯

分类分类

去除ecshop商品重复属性sql命令

2015-07-11 10:56作者:fang

采用ecshop助理以及后台批量导入功能,很容易引起商品属性值混乱,如果属性值重,以下方法可以很好的解决值唯一问题

去除ecshop商品重复属性sql命令

在数据库中执行以下语句:

delete a

from `ecs_goods_attr` a

left join(select `goods_attr_id`,`attr_id` from `ecs_goods_attr` group by goods_id,attr_value) b

on a.`goods_attr_id` = b.`goods_attr_id`

and a.`attr_id` = b.`attr_id`

where b.`goods_attr_id` is null AND b.`attr_id` is null;

展开全部

相关

说两句网友评论
    我要跟贴
    取消