Tb_user
Id, username, parentId
In direct sales system project, the member level supervisor is infinite, then want to look up a member of the team members (including the lower, under the lower down the lower... ) can't do the query,
so the question comes, this kind of situation is how to design a database table?
CodePudding user response:
This design can query, need to use a recursive query, look at this examplehttps://www.cnblogs.com/xiaoxi/p/5942805.html
CodePudding user response:
https://blog.csdn.net/ACMAIN_CHM/article/details/4142971