formatting of sql query for "cnt_p_fold"

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

formatting of sql query for "cnt_p_fold"

Postby samweiss » Sat Jan 19, 2013 1:22 pm

I'm trying to perform the following query fro PT3's database via postgreSQL:

query='SELECT ALL cnt_p_fold FROM holdem_hand_player_statistics';
prefold = fetch(conn,query);

Which is currently returning the error:
"ERROR: column "cnt_p_fold" does not exist"


Can somebody please point out what I'm missing? I've tried copying the expression for this parameter from the "configure statistics" dialogue in PT3, but it fails every time
samweiss
 
Posts: 9
Joined: Thu Jan 10, 2013 7:23 am

Re: formatting of sql query for "cnt_p_fold"

Postby PeteX » Sat Jan 19, 2013 1:29 pm

There isn't such column in the database. It's a "virtual" column computed by PT from actual database values. Take a look at the expression that defines cnt_p_fold in PT and you should get an "eureka" moment, IMO.
PeteX
 
Posts: 194
Joined: Sat Apr 05, 2008 9:12 am

Re: formatting of sql query for "cnt_p_fold"

Postby samweiss » Sat Jan 19, 2013 3:46 pm

Thanks for the speedy reply.

I did try pasting the whole expression into the query string, which was throwing an error back.

I've just tried grabbing the "flg_p_fold" variable which worked flawlessly, so thank you.



I am still experiencing problems with the "cnt_p_check variable" - I understand that the expression in the configure stats window is

"sum(if[substring(lookup_actions_p.action from 1 for 1)='X', 1, 0])".

I've been trying the query:
query='SELECT ALL action FROM lookup_actions_p'

but it throws the error:
ERROR: relation "lookup_actions_p" does not exist

Thanks for your support
samweiss
 
Posts: 9
Joined: Thu Jan 10, 2013 7:23 am

Re: formatting of sql query for "cnt_p_fold"

Postby WhiteRider » Sat Jan 19, 2013 5:38 pm

lookup_actions_p isn't a database field - actions are stored in the lookup_actions table and are referenced by an ID number. I'm not sure how you'd do that as a database query but if you look in the PokerTracker.log file (in the main PokerTracker 3 folder) you should be able to see the exact queries used.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 19 guests

cron
highfalutin