mysql之上二级
#获取会员的上二级 drop view if exists vwMemberL2Parent; create view vwMemberL2Parent as select m.id, m.parent_id, m.nickname, m.realname, m.avatar, m.mobile, m.invite_merch_id, L2.nickname as L2nickname, L2.realname as L2realname, L2.avatar as L2avatar, L2.mobile as L2mobile from `ims_tycb_xyl_member` as m LEFT JOIN `ims_tycb_xyl_member` as L1 on m.parent_id = L1.id LEFT JOIN `ims_tycb_xyl_member` as L2 on L1.parent_id = L2.id
作者:糖粿
来源:博客园
转载请注明原文链接:https://www.cnblogs.com/silen0119/p/12914967.html
声援博主: 如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。