统计不知道 为何不准  


SELECT count(g.goods_id)FROM `cxwsjy5`.`ecs_goods` AS g LEFT JOIN `cxwsjy5`.`ecs_member_price` AS mp ON mp.goods_id = g.goods_id AND mp.user_rank = '0'   inner join ecs_goods_attr as a
                                                        on g.goods_id=a.goods_id and ( (a.`attr_id` = 42901 and a.attr_value like '%L%') )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 '%裙%' )) )  )




返回1329

SELECT g.goods_id,g.click_count, g.goods_name, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, IFNULL(mp.user_price, g.shop_price * '1') AS shop_price, g.promote_price, g.promote_start_date, g.promote_end_date, g.goods_thumb, g.goods_img, g.goods_brief, g.goods_type FROM `cxwsjy5`.`ecs_goods` AS g LEFT JOIN `cxwsjy5`.`ecs_member_price` AS mp ON mp.goods_id = g.goods_id AND mp.user_rank = '0'   inner join ecs_goods_attr as a
                                                        on g.goods_id=a.goods_id and ( (a.`attr_id` = 42901 and a.attr_value like '%L%') )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 '%裙%' )) )  ) ORDER BY click_count DESC



返回29