diff --git a/pyfpdb/GuiPlayerStats.py b/pyfpdb/GuiPlayerStats.py index cb5f2936..3946e629 100644 --- a/pyfpdb/GuiPlayerStats.py +++ b/pyfpdb/GuiPlayerStats.py @@ -424,9 +424,12 @@ class GuiPlayerStats (threading.Thread): bbtest = bbtest + " and gt.type = 'tour' " query = query.replace("", bbtest) - if holecards: # pinch level variables for hole card query + if holecards: # re-use level variables for hole card query query = query.replace("", "hp.startcards") - query = query.replace("", ",hgameTypeId desc") + query = query.replace("" + , ",case when hp.startcards/13 >= mod(hp.startcards,13) then hp.startcards + 0.1 " + + " else 13*mod(hp.startcards,13) + hp.startcards/13 " + + " end desc ") else: query = query.replace("", "") groupLevels = "show" not in str(limits)