Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multilevel must use recursive?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00539221
Message ID:
00540077
Vues:
16
Hi John,

Frop your original message, I think you were calculating the bonuses for an up-line on a multi-level marketing scheme.

I'd define the structure of the table something like:
MemberID INT  && unique ID for each member
ParentID INT  && ID of immediate up-line member - 0 for root of the tree
Sales CURRENCY  && Total sales for this member
In this way, you can use the SQL technique I describe in the FoxTalk article available on my site to get the sales for each member and their subordinate members.

You can also get information about how many levels of members there are under each member and so on.

Cheers,

Andrew

>Hi,
> Thank you for your sample code and info. Seem, I do it wrongly at the beginning, save data in defined relationship. Could you tell me, how should I define the level?
>
>Ex.
>Item
>A01, B01, C01
>
>Package
>AA01 - A01, B01
>BB01 - AA01, C01
>
>Refer to the case above, What is the level for AA01 and C01?
>
>Thank you


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform