0
My goal is to create a multi-level marketing system, with two teams.
Left Team and Right Team
I’m having trouble keeping score.
My table looks like this: id_user | sponsor | leg( 0 left , 1 right) | points
Remembering that the network has no limit and that the sum of points on the left for example includes all points of the respective downlines.
I need help to make that score.
Thank you so much! Just one more question, as I do to see the points of a particular user.
– Marcos Porto
Just pass the code on your search
SELECT PONTOS FROM cic_ciclone_user WHERE id_user = 1
where 1 is the id you want to search for. .– Aprendiz
My first time in Stack, I’m sorry, for example, the user with id_user =1 , he is the sponsor of 2 and 3 , 2 is in leg 0 = left and 3 in leg 1 = right. My goal is to calculate the sum of points of the team left and right of the user... It’s a bit complex I admit, I hope you understand, your help is being excellent!
– Marcos Porto
I could not understand, try to put in your question initial pictures of the table structure or some creation script
– Aprendiz
see if it’s a little clearer, I’m providing images of the table.
– Marcos Porto