id_limit question

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

id_limit question

Postby Duppy81 » Wed Jan 28, 2009 6:06 am

How is id_limit defined? I mean, what does PT3 call a $4 NL (6 max) table ie? Preferably, how are 6 max and full ring tables distinquished? When I try to write something like this in a new scoring statistic:

Code: Select all
if (id_limit = '$4 NL (6 max)', 1, 0)


It will validate but when I scan for those $4 NL (6 max) tables in Table Tracker it will not recognize my code and it will still give all players a score of "0" where it should, if the code is working correctly, give the players on a $4 NL (6 max) table a score of "1".

Thanks!
Duppy81
 
Posts: 26
Joined: Fri Jan 25, 2008 12:39 pm

Re: id_limit question

Postby WhiteRider » Wed Jan 28, 2009 8:06 am

You would have been better asking this in your other thread since it is the same underlying question!
Limits are added in the order they are imported, so there is no way of knowing exactly what numbers will be applied, but you can look up the text of the level with:
lookup_from_id(id_limit, 'limitsort')
(see the 'Limit' stat)

That said, it is hard to check for text at the end of the string unless you know how long the string is.
You can use the "substring" function, but only in a column not a statistic.
See the Custom Statistics and Reports FAQ for usage info - e.g. you could check for:
substring( lookup_from_id(id_limit, 'limitsort') from 7 for 7 ) = '(6 max)'
..but that will only work if the start of the string is the same length as your "$4 NL (6 max)" example.

I guess you could extend it to do:
substring( lookup_from_id(id_limit, 'limitsort') from 7 for 7 ) = '(6 max)' OR substring( lookup_from_id(id_limit, 'limitsort') from 8 for 7 ) = '(6 max)' OR ...
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: id_limit question

Postby Duppy81 » Wed Jan 28, 2009 8:37 am

WhiteRider wrote:but you can look up the text of the level with:
lookup_from_id(id_limit, 'limitsort')
(see the 'Limit' stat)


How/ where do I do this?

edit: nevermind. I'm primarily playing 400NL Shorthanded and Full Ring. They are defined as follows:

$4 NL
$4 NL (6 max)

I already tried applying these "tags" in codes to identify the limit, they will validate but it doesn't work.

Ie, if I create a statistic like this:

Code: Select all
if (id_limit = '$4 NL', 1, 0)


It will just give "0" scores to all players I have stats on, including the ones sitting on the '$4NL' tables. So it doesn't seem to recognize or something...
Duppy81
 
Posts: 26
Joined: Fri Jan 25, 2008 12:39 pm

Re: id_limit question

Postby kraada » Wed Jan 28, 2009 12:01 pm

That's why you need the lookup_from_id part; you want lookup_from_id(id_limit, '$4 NL'). The actual id_limit is a number which PT3 uses to uniquely identify each limit and varies by user.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: id_limit question

Postby Duppy81 » Thu Jan 29, 2009 4:43 am

kraada wrote:That's why you need the lookup_from_id part; you want lookup_from_id(id_limit, '$4 NL'). The actual id_limit is a number which PT3 uses to uniquely identify each limit and varies by user.


Ok, then how/ where do I do this? Where can I find this number? Also, won't this number ever change?
Duppy81
 
Posts: 26
Joined: Fri Jan 25, 2008 12:39 pm

Re: id_limit question

Postby Duppy81 » Thu Jan 29, 2009 5:41 am

I see Table Tracker also has a column called "Players". If I can find a way to use this value I figure I don't need to identify the limit. I've searched through all statistics but can't find this "Players" stat anywhere.
Duppy81
 
Posts: 26
Joined: Fri Jan 25, 2008 12:39 pm

Re: id_limit question

Postby kraada » Thu Jan 29, 2009 12:04 pm

You'd use the lookup_from_id() in a statistic in the Holdem Cash Player Statistics area.

See the Limit stat in the Holdem Cash Session or Holdem Cash Sessions tab for an example.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 5 guests