Page 1 of 1

how to script multilevel referal page

Posted: Thu Feb 04, 2010 4:35 am
by adsegzy
Hello please i need a help on how to script a multilevel referal page. I want it to be that when a member (Eg. Mike) register, he is on level 1, when he refer someone(Eg. Nelson) he(Mike) should move to level 2 and Nelson in level 1. when Nelson refer another person(Eg. Clitton), Clitton should be in level one, Nelson should move to level 2 and Mike should move to level 3 automatically.

Regards.

Re: how to script multilevel referal page

Posted: Thu Feb 04, 2010 9:51 am
by social_experiment
  • 1. Will every member receive a level up when a new person has been refered; or will it just be the person who does the refering and the person refered receiving +1 to their levels?

Re: how to script multilevel referal page

Posted: Thu Feb 04, 2010 3:05 pm
by adsegzy
No, it is only the person that does the refering and those above him/her that will receive +1.

regards

Re: how to script multilevel referal page

Posted: Thu Feb 04, 2010 5:00 pm
by social_experiment
No, it is only the person that does the refering and those above him/her that will receive +1.
I would then say select the person doing the refering (and everyone else above him/her) and just add + 1 to each of the respected levels. If there are already levels existing, they will have to be updated. If you are using a database (which is what my suggestion works on) you would have a SELECT query and an UPDATE query.

Also, what would your database structure look like and how would the referer be tied together with the people above him / her? And if a person with a higher level referers someone, how will incrementing the levels work then? Example : Mike refers bob, bob is then 1 and Mike 4, what about Clitton and Nelson?