Alias and hero ID question

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Alias and hero ID question

Postby js2002 » Thu Aug 19, 2010 4:29 pm

My main hero ist id_player = 2 in the player DB (non cache)
my alias is 87900.

If I req this:

SELECT (sum((case when(holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) as cnt_vpip " + "FROM holdem_hand_player_statistics WHERE (id_player = 87900)";

result = null

If I req this:

SELECT (sum((case when(holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) as cnt_vpip " + "FROM holdem_hand_player_statistics WHERE (id_player = 2)";

result = 2094 so a value!

Thats clear because the id 87900 got dedicated to the main id 2.

But how to I request the flg_vpip only for the id 87900 ?

I will have to start with the request with "WHERE ... 2" and then somehow filter to the site?!
fe I only need the sum for site 300 ( FTP)
js2002
 
Posts: 1501
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Alias and hero ID question

Postby js2002 » Thu Aug 19, 2010 4:50 pm

3. SELECT *(hier halt die flags summieren) FROM holdem_hand_player_statistics WHERE id_player = '2' AND id_player_real = '87900' ;
got it done
js2002
 
Posts: 1501
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Alias and hero ID question

Postby kraada » Thu Aug 19, 2010 4:54 pm

Good to know, thanks for the follow up.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 39 guests

cron