python getting hands played per player id per period x

Questions and discussion about PokerTracker 4 for Windows

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

python getting hands played per player id per period x

Postby 456843 » Sun Apr 15, 2018 2:37 am

Hi,

I'm trying to create a python script which allows me to track the number of hands I have played for a specific date, but I'm having trouble figuring out how to make it work.

Here's what I've got so far, but I haven't quite figured out how to go about getting the number of hands, or select a filter / date for that period.

Code: Select all
import psycopg2

name = "PlayerMHM0"
conn_string = "host='localhost' dbname='PT4 DB' user='postgres' password='dbpass'"
conn = psycopg2.connect(conn_string)
cursor = conn.cursor()

cursor.execute("SELECT id_player FROM player WHERE player_name = '"+name+"'")

records = cursor.fetchone()

c = records


If there are any python whizzes here, I'd be very grateful for any help.
456843
 
Posts: 20
Joined: Mon Nov 04, 2013 12:45 pm

Return to PokerTracker 4

Who is online

Users browsing this forum: No registered users and 42 guests

cron