Home  >  Article  >  Backend Development  >  How can I convert this into code?

How can I convert this into code?

WBOY
WBOYOriginal
2016-09-12 17:44:47869browse

How can I convert this into code?

For example, the amount of 100 yuan should be divided equally among many people, 15% for the upper level, 20% for the upper level, 20%, 15% for the upper level, 15%, 5% for the upper level, 5%

Reply content:

How can I convert this into code?

For example, the amount of 100 yuan should be divided equally among many people, 15% for the upper level, 20% for the upper level, 20%, 15% for the upper level, 15%, 5% for the upper level, 5%

That’s what I thought

Company ID, company name, parent company ID This is similar to a tree menu

For example, company ID = 15, company name = 3D Code Technology, parent company ID = 17
First write an algorithm and search up level by level to form a tree menu. At the top, parent ID = 0

In this way, the income can be distributed.

You want code + table design! I still want ideas!

Table design depends on infinite classification
The code logic is based on level one, level two, and level three. . . . . The percentage of categories

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn