SELECT COUNT(*) FROM `dsc1`.`dsc_goods` AS g LEFT JOIN `dsc1`.`dsc_brand` AS b ON b.brand_id = g.brand_id LEFT JOIN `dsc1`.`dsc_link_brand` AS lb ON lb.bid = g.brand_id LEFT JOIN `dsc1`.`dsc_merchants_shop_brand` AS msb ON msb.bid = lb.bid left join `dsc1`.`dsc_warehouse_goods` as wg on g.goods_id = wg.goods_id and wg.region_id = ‘3‘ left join `dsc1`.`dsc_warehouse_area_goods` as wag on g.goods_id = wag.goods_id and wag.region_id = ‘32‘ WHERE g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 AND (( 1 AND ((goods_name LIKE ‘%米%‘ OR goods_sn LIKE ‘%米%‘ OR keywords LIKE ‘%米%‘ )) ) AND (b.audit_status = 1 OR msb.audit_status = 1) AND g.review_status > 2 )
bid对不上brand_id 结果为空
时间: 2024-10-29 19:06:26