in my application, the user launches a new tree or is added as a child user and continues to add users to branches in this way -
>there are 10 levels of the tree type structure.
>root node contains 1the user and each node (user) can have a subsidiary user max 5 thus will be like a tree level 0 = 1 user,
level 1 = 5 user,
level 2 = 25 user,
level 3 = 125 useretc.
I created one MySQL table with columns, for example -
User_id, level, super_id, child1_id, child2_id, child3_id, child4_id,child5_id
my question is: how do I get all the child users ( child to child also) of a particular user at any level , do I need to add a few more columns to the table?
source
share