Reconstructing profit graph?

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Reconstructing profit graph?

Postby JimmSlimm » Wed May 06, 2009 3:32 pm

Hi, I am trying to make a profit graph just like in PT3 "Money won for hands played"

What is the easiest way to do this?

in c# I am doing the following(it's the wrong method, It doesnt display correct winnings):

command = new Npgsql.NpgsqlCommand("SELECT holdem_hand_player_detail.amt_bet_ttl, holdem_hand_summary.id_winner, holdem_hand_summary.amt_pot FROM holdem_hand_summary INNER JOIN holdem_hand_player_detail ON holdem_hand_player_detail.id_hand = holdem_hand_summary.id_hand WHERE holdem_hand_player_detail.id_player=" + id_player + " AND holdem_hand_summary.id_site=" + sSiteID + "", connection);
reader = command.ExecuteReader();
int iCount = 0;
double dNET = 0;
while (reader.Read())
{
double dBet = (double)reader.GetDecimal(0);
int iWinner = (int)reader.GetInt32(1);
double dPot = (double)reader.GetDecimal(2);

dNET -= dBet;
if (iWinner == id_player)
dNET += dPot;
list1.Add(iCount++, dNET);
}
reader.Close();
JimmSlimm
 
Posts: 16
Joined: Tue Oct 14, 2008 5:32 pm

Re: Reconstructing profit graph?

Postby JimmSlimm » Wed May 06, 2009 4:36 pm

nevermind I got it, the solution was "amt_won" in holdem_hand_player_statistics
JimmSlimm
 
Posts: 16
Joined: Tue Oct 14, 2008 5:32 pm


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests