Results 1 to 1 of 1
Thread: How to get levels ?
May 2, 2010, 06:11 #1
- Join Date
- May 2005
- 0 Post(s)
- 0 Thread(s)
How to get levels ?
I am working on a mlm script and I am not sure if i am going in the right direction. The mlm script is 3 (width) x 9 (level) based. The design of my database is following:
CREATE TABLE IF NOT EXISTS `members` ( `memb_id` mediumint(9) NOT NULL AUTO_INCREMENT, `memb_pid` mediumint(9) NOT NULL, `memb_pos` tinyint(1) NOT NULL, `memb_fullname` varchar(50) NOT NULL, PRIMARY KEY (`memb_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
As 1 member can only have 3 sub-members that i have also covered.
Now there are payouts at each different level.
Eg. If member 1 who is on top joins 3 members below him then he gets 200 for each member.
Then if those 3 members join 3x3 = 9 members below them then they each get 200 for each but the 1st top member gets 100 for each member.
How to make this kind of thing ?