如何将佣金归功于一个孩子PHP mysql的所有父母 [英] How to credit commisions to all the parents of a child PHP mysql

查看:49
本文介绍了如何将佣金归功于一个孩子PHP mysql的所有父母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施带自动出价的连锁系统。 一个用户由父母推荐(推荐)时,直接推荐帐户必须记入10%的用户包裹金额,所有直接推荐的父母都记入5%的量。我该如何实现它。请告诉我 基础知识  oops。 

[检查图片] [ 1 ]

https: // i.stack.imgur.com/tkU4S.jpg

----------------------------------------------- -----

<! - begin snippet:js hide: false console: true babel: false - >

<! - 语言:lang-html - >


plan_id plan_amount daily_commision
------------------------------- ----------------------
p1 $ 100 0 .7%

p2 $ 250 1 .0%

p3 $ 500 1 。 5%

p4 $ 1000 2%


user_id密码计划plan_amount refer_by income status
------------- --------------------------------------------
usr0 < span class =code-digit> 22222 p1 $ 100全球$ 57。 5 1
usr1 12345 p1 $ 100 usr0 $ 72。 5 1
user2 123sad p1 $ 100 usr1 $ 135 1
user3 asdf4f p2 $ 250 user2 $ 10 1
user4 321423 p4 $ 1000 user2 0 1

<! - end snippet - >


这里 用户表user4由user2引用,然后10%commision记入user2,5%commision添加到间接引用usr1和usr0。


然后用户根据他们的包裹获得每日佣金。每日commision 仅添加到用户而不是引用。每个用户每天都得到他们的日常佣金。

请帮帮我并保存我的工作,谢谢你





[ 1 ]:https: // i.stack.imgur.com/tkU4S.jpg





我尝试过:



i已经尝试了这个,但我只能向一个父母增加佣金,我不会给超级父母增加佣金。

解决方案

100 0 .7%

p2


250 1 。 0%

p3


500 1 .5%

p4

i am implementing chain system with auto bidding. when one user referred by parent(referral) then direct referral account have to credited with 10% of the user package amount and all parents of the direct referral credited 5% of the amount. how can i implement it. please tell me in basics not in oops.

[Check this image][1]

https://i.stack.imgur.com/tkU4S.jpg

----------------------------------------------------

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->


    plan_id                  plan_amount                daily_commision
    -----------------------------------------------------
    p1                          $100                       0.7%

    p2                          $250                       1.0%

    p3                          $500                       1.5%

    p4                          $1000                       2%


    user_id password plan plan_amount referred_by income status 
    ---------------------------------------------------------
    usr0    22222    p1     $100      Global       $57.5     1
    usr1    12345    p1     $100       usr0        $72.5     1
    user2   123sad   p1     $100       usr1        $135      1
    user3   asdf4f   p2     $250       user2       $10       1
    user4   321423   p4     $1000      user2       0         1  

<!-- end snippet -->
 

here is users table user4 referred by user2 then 10% commision credited to user2 and 5% commision added to indirect referral usr1 and usr0.


then user gets daily commision according to their package. daily commision is added to user only not referral. every user got their daily commission every day.

please help me and save my job thanking you

  
 


  [1]: https://i.stack.imgur.com/tkU4S.jpg



What I have tried:

i already tried this but i can able add commission to one parent only, i'm not add commission to super parents.

解决方案

100 0.7% p2


250 1.0% p3


500 1.5% p4


这篇关于如何将佣金归功于一个孩子PHP mysql的所有父母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆