Custom Column Error

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: Custom Column Error

Postby Bill_Balas » Mon Feb 20, 2017 1:41 pm

The code in Blue color has no "in", I've checked, but that's probably my fault because of the way I've presenting the data. Let me regroup the full code, transformed:

((((((cash_hand_summary.card_4 > 0 and (((cash_hand_summary.card_1 % 13 = 0 OR cash_hand_summary.card_2 % 13 = 0 OR cash_hand_summary.card_3 % 13 = 0 OR cash_hand_summary.card_4 % 13 =0) AND (((cash_hand_summary.card_1 % 13=1 OR cash_hand_summary.card_2 % 13=1 OR cash_hand_summary.card_3 % 13=1 OR cash_hand_summary.card_4 % 13=1) AND ((cash_hand_summary.card_1 % 13=2 OR cash_hand_summary.card_2 % 13=2 OR cash_hand_summary.card_3 % 13=2 OR cash_hand_summary.card_4 % 13=2) OR (cash_hand_summary.card_1 % 13=3 OR cash_hand_summary.card_2 % 13=3 OR cash_hand_summary.card_3 % 13=3 OR cash_hand_summary.card_4 % 13=3) OR (cash_hand_summary.card_1 % 13=4 OR cash_hand_summary.card_2 % 13=4 OR cash_hand_summary.card_3 % 13=4 OR cash_hand_summary.card_4 % 13=4))) OR ((cash_hand_summary.card_1 % 13=2 OR cash_hand_summary.card_2 % 13=2 OR cash_hand_summary.card_3 % 13=2 OR cash_hand_summary.card_4 % 13=2) AND ((cash_hand_summary.card_1 % 13=3 OR cash_hand_summary.card_2 % 13=3 OR cash_hand_summary.card_3 % 13=3 OR cash_hand_summary.card_4 % 13=3) OR (cash_hand_summary.card_1 % 13=4 OR cash_hand_summary.card_2 % 13=4 OR cash_hand_summary.card_3 % 13=4 OR cash_hand_summary.card_4 % 13=4))) OR ((cash_hand_summary.card_1 % 13=3 OR cash_hand_summary.card_2 % 13=3 OR cash_hand_summary.card_3 % 13=3 OR cash_hand_summary.card_4 % 13=3) AND (cash_hand_summary.card_1 % 13=4 OR cash_hand_summary.card_2 % 13=4 OR cash_hand_summary.card_3 % 13=4 OR cash_hand_summary.card_4 % 13=4)) OR ((cash_hand_summary.card_1 % 13=12 OR cash_hand_summary.card_2 % 13=12 OR cash_hand_summary.card_3 % 13=12 OR cash_hand_summary.card_4 % 13=12) AND ((cash_hand_summary.card_1 % 13=11 OR cash_hand_summary.card_2 % 13=11 OR cash_hand_summary.card_3 % 13=11 OR cash_hand_summary.card_4 % 13=11) OR (cash_hand_summary.card_1 % 13=10 OR cash_hand_summary.card_2 % 13=10 OR cash_hand_summary.card_3 % 13=10 OR cash_hand_summary.card_4 % 13=10) OR (cash_hand_summary.card_1 % 13=9 OR cash_hand_summary.card_2 % 13=9 OR cash_hand_summary.card_3 % 13=9 OR cash_hand_summary.card_4 % 13=9))) OR ((cash_hand_summary.card_1 % 13=11 OR cash_hand_summary.card_2 % 13=11 OR cash_hand_summary.card_3 % 13=11 OR cash_hand_summary.card_4 % 13=11) AND ((cash_hand_summary.card_1 % 13=10 OR cash_hand_summary.card_2 % 13=10 OR cash_hand_summary.card_3 % 13=10 OR cash_hand_summary.card_4 % 13=10) OR (cash_hand_summary.card_1 % 13=9 OR cash_hand_summary.card_2 % 13=9 OR cash_hand_summary.card_3 % 13=9 OR cash_hand_summary.card_4 % 13=9))) OR ((cash_hand_summary.card_1 % 13=10 OR cash_hand_summary.card_2 % 13=10 OR cash_hand_summary.card_3 % 13=10 OR cash_hand_summary.card_4 % 13=10) AND (cash_hand_summary.card_1 % 13=9 OR cash_hand_summary.card_2 % 13=9 OR cash_hand_summary.card_3 % 13=9 OR cash_hand_summary.card_4 % 13=9)))) OR ((cash_hand_summary.card_1 % 13>=1 AND cash_hand_summary.card_2 % 13>=1 AND cash_hand_summary.card_3 % 13>=1 AND cash_hand_summary.card_4 % 13>=1) AND ((((cash_hand_summary.card_1 % 13) + 4 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_1 % 13) + 4 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_1 % 13) + 4 = (cash_hand_summary.card_4 % 13)) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 3) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 3) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 3))) OR (((cash_hand_summary.card_1 % 13) + 3 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_1 % 13) + 3 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_1 % 13) + 3 = (cash_hand_summary.card_4 % 13 )) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 2) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 2) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_1 % 13) + 1 AND (cash_hand_summary.card_1 % 13) + 2))) OR (((cash_hand_summary.card_1 % 13) + 2 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_1 % 13) + 2 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_1 % 13) + 2 = (cash_hand_summary.card_4 % 13)) AND (cash_hand_summary.card_2 % 13 = (cash_hand_summary.card_1 % 13) + 1 OR cash_hand_summary.card_3 % 13 = (cash_hand_summary.card_1 % 13) + 1 OR cash_hand_summary.card_4 % 13 = (cash_hand_summary.card_1 % 13) + 1)) OR (((cash_hand_summary.card_2 % 13) + 4 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_2 % 13) + 4 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_2 % 13) + 4 = (cash_hand_summary.card_4 % 13)) AND ((cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 3) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 3) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 3))) OR (((cash_hand_summary.card_2 % 13) + 3 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_2 % 13) + 3 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_2 % 13) + 3 = (cash_hand_summary.card_4 % 13)) AND ((cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 2) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 2) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_2 % 13) + 1 AND (cash_hand_summary.card_2 % 13) + 2))) OR (((cash_hand_summary.card_2 % 13) + 2 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_2 % 13) + 2 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_2 % 13) + 2 = (cash_hand_summary.card_4 % 13)) AND (cash_hand_summary.card_1 % 13 = (cash_hand_summary.card_2 % 13) + 1 OR cash_hand_summary.card_3 % 13 = (cash_hand_summary.card_2 % 13) + 1 OR cash_hand_summary.card_4 % 13 = (cash_hand_summary.card_2 % 13) + 1)) OR (((cash_hand_summary.card_3 % 13) + 4 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_3 % 13) + 4 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_3 % 13) + 4 = (cash_hand_summary.card_4 % 13)) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 3) OR (cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 3) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 3))) OR (((cash_hand_summary.card_3 % 13) + 3 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_3 % 13) + 3 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_3 % 13) + 3 = (cash_hand_summary.card_4 % 13)) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 2) OR (cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 2) OR (cash_hand_summary.card_4 % 13 BETWEEN (cash_hand_summary.card_3 % 13) + 1 AND (cash_hand_summary.card_3 % 13) + 2))) OR (((cash_hand_summary.card_3 % 13) + 2 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_3 % 13) + 2 = (cash_hand_summary.card_1 % 13) OR (cash_hand_summary.card_3 % 13) + 2 = (cash_hand_summary.card_4 % 13)) AND (cash_hand_summary.card_2 % 13 = (cash_hand_summary.card_3 % 13) + 1 OR cash_hand_summary.card_1 % 13 = (cash_hand_summary.card_3 % 13) + 1 OR cash_hand_summary.card_4 % 13 = (cash_hand_summary.card_3 % 13) + 1)) OR (((cash_hand_summary.card_4 % 13) + 4 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_4 % 13) + 4 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_4 % 13) + 4 = (cash_hand_summary.card_1 % 13)) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 3) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 3) OR (cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 3))) OR (((cash_hand_summary.card_4 % 13) + 3 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_4 % 13) + 3 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_4 % 13) + 3 = (cash_hand_summary.card_1 % 13)) AND ((cash_hand_summary.card_2 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 2) OR (cash_hand_summary.card_3 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 2) OR (cash_hand_summary.card_1 % 13 BETWEEN (cash_hand_summary.card_4 % 13) + 1 AND (cash_hand_summary.card_4 % 13) + 2))) OR (((cash_hand_summary.card_4 % 13) + 2 = (cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_4 % 13) + 2 = (cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_4 % 13) + 2 = (cash_hand_summary.card_1 % 13)) AND (cash_hand_summary.card_2 % 13 = (cash_hand_summary.card_4 % 13) + 1 OR cash_hand_summary.card_3 % 13 = (cash_hand_summary.card_4 % 13) + 1 OR cash_hand_summary.card_1 % 13 = (cash_hand_summary.card_4 % 13) + 1))))))))))))


On the mismatched bracket, I can't find the error. Would you pinpoint it, please?

Thanks for all the help & sorry for insisting on this but it really matters.
Bill_Balas
 
Posts: 161
Joined: Wed Oct 22, 2014 8:57 pm

Re: Custom Column Error

Postby WhiteRider » Tue Feb 21, 2017 4:17 am

There is one bracket too many at the end. I copied the expression into Notepad++ which highlights matching brackets automatically. I haven't checked where all of the individual pairs of brackets throughout are though.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Custom Column Error

Postby Bill_Balas » Tue Feb 21, 2017 5:57 am

Ok, we have a working code.... but with this code a column isn't cacheable. Would it be possible to transform it so it would be? According to the caching guide, a reference to cash_hand_summary can only be cached if there is also a reference to cash_hand_player_statistics and subquerys cannot be cached, but I wouldn't know how to proceed...

On a different point,having copied the original code from the log file, it doesn't originally test for "-1". As you pointed earlier, test for "-1" as well as "+1" in order to catch 76 as well as 67". So, the built in code isn't really testing for every "any straight possible" situation, correct? And if I'm reading the code correctly, "-1", "-2", "-3" & "-4" conditions would need to be added. Correct?

Thanks.
Bill_Balas
 
Posts: 161
Joined: Wed Oct 22, 2014 8:57 pm

Re: Custom Column Error

Postby WhiteRider » Wed Feb 22, 2017 4:45 am

If you want to include a reference to cash_hand_player_statistics you could just include 'cash_hand_player_statistics.id_hand > 0' for example.
I haven't looked back at the original query but the +1/-1 may not be needed with the 'IN' statements depending on how they're written, but the filter for connectedness does file 87 as well as 78 on the flop for example.
You can experiment with your expression by using it as a filter if you like - see this post for how I test which hands are returned when I'm making my own stats.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Custom Column Error

Postby Bill_Balas » Wed Feb 22, 2017 3:03 pm

Cacheable column!!

Thank you!!!
Bill_Balas
 
Posts: 161
Joined: Wed Oct 22, 2014 8:57 pm

Re: Custom Column Error

Postby WhiteRider » Thu Feb 23, 2017 3:50 am

Great!
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Previous

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 20 guests

cron
highfalutin