A
A
Andrey Panasyuk2015-10-18 14:53:59
PHP
Andrey Panasyuk, 2015-10-18 14:53:59

How to implement an affiliate program on a site with eight levels of nesting using php and MySQL?

Hello!
I want to implement an affiliate program on the site with eight levels of nesting, but I don’t know how to implement this using php and MySQL. The principle of operation is as follows: if user A brought user B, then A becomes his referral and his level is 1, and if user B brought user C, then B becomes his referral and his level is 2 for user A and 1 for user B, but if A brings D then A becomes his referral and his level is 1, and so on up to the eighth level of user nesting. I hope you understand the essence.
But then I need someone to display them from the database and for each user to display their nesting level, for example:
if user A then:

  • B - 1 level
  • D - 1 level
  • C - level 2

and if user B then:
  • C - 1 level
Here is an example picture for better understanding

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Михаил, 2015-10-18
@scherbuk

https://www.google.by/webhp?sourceid=chrome-instan...

D
Dimonchik, 2015-10-18
@dimonchik2013

ну, так чо рассказать? ты быстрее забьешь на задачу, чем тут расписывать реализацию

R
Ruslan Fedoseev, 2015-10-18
@martin74ua

You are still on freelancim with such questions;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question