标签:ops mem member left join 字段 name 记录 lan 测试
三表关联如果字段为0则表示是散客卡
select a.shop_id as id,b.shop_name,a.balance,a.point,
(IF(a.card_type_id<>0,concat(c.card_type,"(测试环境测试11)"),‘散客卡(测试环境测试11)‘)) as card from members a INNER JOIN
shops b on a.shop_id=b.id LEFT JOIN card_types c on a.card_type_id=c.id where a.mobile_phone=11111111111;
标签:ops mem member left join 字段 name 记录 lan 测试
原文地址:http://www.cnblogs.com/xianhaiyan/p/6230815.html