mysql之上二级
#获取会员的上二级dropviewifexists vwMemberL2Parent;createview vwMemberL2Parent asselect 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
LEFTJOIN `ims_tycb_xyl_member` as L1 on m.parent_id = L1.id
LEFTJOIN `ims_tycb_xyl_member` as L2 on L1.parent_id = L2.id
以上是 mysql之上二级 的全部内容, 来源链接: utcz.com/z/533703.html