def count_recipients(c, banner, prestige): return query_first(c, '''SELECT COUNT(*) FROM player_banners WHERE banner = %s AND prestige >= %s''', banner, prestige)
def count_recipients(c, banner, prestige): return query_first( c, '''SELECT COUNT(*) FROM player_banners WHERE banner = %s AND prestige >= %s''', banner, prestige)
def count_clan_nemelex_wins(c, char): return query_first( c, '''SELECT COUNT(*) FROM clan_nemelex_wins WHERE clan_finish = 1 AND charabbrev = %s''', char)
def count_nemelex_wins(c, char): return query_first( c, '''SELECT COUNT(*) FROM player_nemelex_wins WHERE charabbrev = %s''', char)
def player_has_nemelex_win(c, player, char): return (query_first( c, '''SELECT COUNT(*) FROM player_nemelex_wins WHERE player = %s AND charabbrev = %s''', player, char) > 0)