SELECT g.goods_id, g.goods_name,g.goods_number,g.goods_img, g.shop_price AS org_price, g.promote_price, IFNULL(mp.user_price, g.shop_price * '1') AS shop_price, promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd FROM `htmlpfnew`.`ecs_goods` AS g LEFT JOIN `htmlpfnew`.`ecs_brand` AS b ON b.brand_id = g.brand_id and g.is_index_pro = 0 LEFT JOIN `htmlpfnew`.`ecs_member_price` AS mp ON mp.goods_id = g.goods_id AND mp.user_rank = '0' WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND g.is_promote = 1 
SELECT g.goods_id, g.goods_name,g.goods_number,g.goods_img, g.shop_price AS org_price, g.promote_price, IFNULL(mp.user_price, g.shop_price * '1') AS shop_price, promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd FROM `htmlpfnew`.`ecs_goods` AS g LEFT JOIN `htmlpfnew`.`ecs_brand` AS b ON b.brand_id = g.brand_id  LEFT JOIN `htmlpfnew`.`ecs_member_price` AS mp ON mp.goods_id = g.goods_id AND mp.user_rank = '0' WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND g.is_promote = 1 and g.is_index_pro = 0
本来想用这两条语句,来检索一些记录。通过g.is_index_pro = 0 这个字段来判断。取出 g.is_index_pro = 0的字段。但是为什么我这样些。两条语句。的检索结果都包含了 g.is_index_pro = 1的记录在内呢