var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: help me in building a query
I am developing a program for a MLM based company
I have a the following tables
membercode,Membername,sponsorcode and other details
Now i want to calculate the payouts on monthly basis for all the membercode who have bills on the bill table and insert in the tbl_monthlypayouts automatically. Also i want to split up the commission according to the level
Levels will be like this
level name totalbv
The final payouts should be calculated according to the sponsorlevel and the downline commissions also shold be get deducted from the lower level.
if some one can help me to find a solution for this i will be grateful..