I have three tables betsinfo,results,wallet
I have developed the app till the user bets and results are posted and the bets gets settled as win or lose in the betsinfo table.
But i m stuck as for logic on how can i settle the amount in the wallets table.??
The winning bets should be calculated with (to_win_amt) - (stake) = winning amouny
I have all the bets placed in the system in betsinfo table and i am settling the bets by matching the results table.
Now i want to find out the creator of the user and match it with wallet id of the user and settle all their unsettled bets .
How can i achieve this ..any logic help please ??
Aucun commentaire:
Enregistrer un commentaire