Page 1 of 2

Filtering vs specific player

PostPosted: Sun Dec 27, 2009 9:19 pm
by denutza
I created a small custom report in the Omaha Cash Player Stats section.

In the filters I use: str_player_name='oppName'

Whenever I have no filter set, it still shows ALL opponents.

However, when I set my position to X off button, then voila, it works, it only shows oppName.

Not sure if this is a bug, or Im doing something wrong.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 5:26 am
by WhiteRider
str_player_name (and any other value) refers to the current active player - it has nothing to do with opponents.
To filter for hands against a specific opponent you'll need a much more complicated filter - see this post for info to get you started, but be aware that it's not simple (an easier mechanism will be added, but I don't know when).

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 5:12 pm
by denutza
Thanks WR.

I actually found that post yesterday and tried it in my Custom Report.

using SQL statement, subing holdem with omaha:
Code: Select all
( 0 < (SELECT count(hhps2.id_hand) FROM holdem_hand_player_statistics hhps2 WHERE hhps2.id_hand = holdem_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name='name')) )


When I substite 'name' for a name with a digit in it (say '21OPPONENT'), it gives me an SQL error: "more than one row returned by a subquery used as an expression".
*EDIT*: I did get it to work with alphabetical only screennames.


Let me try to explain a simple example of what I need to do:

I create advanced hole card filtering for myself (which really impressed with PT3 here btw), filter for position, # of players, etc.
So if im on button, I want to know when specific OPPONENT(s) either saw flop, or was in Big Blind, etc.

thanks.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 5:40 pm
by kraada
Try using player_name_search instead of player_name and replacing all alphabetic characters with their lowercase equivalents and see if that works better for you.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 5:58 pm
by denutza
No that doesnt work..My example of 21OPPONENTS was a bad one.

If I use all lower case with digits: 21opponents, I get that error.
If I change it to all uppercase: 21OPPONENTS, i never get an error, however if opponents actual
name isnt capitlized, it just returns 0 hands....If opponents name really is capitalized, it works.


One workaround is probably to create an alias for players with digits in their name.

As far as determining if opponent is in big blind/saw flop/etc...Can this be done thru SQL,
and any sample code or documentation links would be helpful.

thanks!

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 6:06 pm
by kraada
For the player in your example, player_name = '21OPPONENTS' should work, as should player_name_search = '21opponents'. player_name_search is the lowercase version of the player name. Did you not add the quotes? That could cause problems.

For more examples of how to build filters like this if you search the forums for "id_hand in" with those quotes (so it comes back as a phrase) you'll see quite a few examples of filters you can build.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 7:06 pm
by denutza
Ok I figured it out.

the opponent I was using with the digit in his screenname has a Pokerstars and FT account spelled
identically. So for some reason this is the problem...no big deal though.

Ive been reading some older sample code, when I use the basic SQL statement above, it takes around
10-20 seconds....When I add:

Code: Select all
( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name='name' and omaha_hand_player_statistics.flg_blind_b)) )


the big blind flag here, my queries taking 20-30 mins and still hasnt finished...Is this normal?
Just did maintenance on DB yesterday.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 7:12 pm
by kraada
How big is this database? These filters can make things take an awful long time . . .

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 7:30 pm
by denutza
Fairly big...around 700k omaha hands or so.

A few more questions:

#1)Should I be using the Omaha Cash Players Statistics to do what i want? or the Omaha Cash Hand section?

#2)I would like my report to show hand id's so I can test them in the replayer to see if everythings working.
Do I have to make a custom Column/Stat to do this?

thx for quick replies.

Re: Filtering vs specific player

PostPosted: Mon Dec 28, 2009 7:34 pm
by denutza
I didnt have "Filter on Active Player" set...that sped things up dramatically, although Im not sure if I should or shouldnt
have it set, until I can actually replay some of the hands and test them.

highfalutin