- Code: Select all
SELECT (case when flg_f_highcard then 9 else
(case when flg_f_1pair then 8 else
(case when flg_f_2pair then 7 else
(case when flg_f_threeoak then 6 else
(case when flg_f_straight then 5 else
(case when flg_f_flush then 4 else
(case when flg_f_fullhouse then 3 else
(case when flg_f_fouroak then 2 else
(case when flg_f_strflush then 1 end) end) end) end) end) end) end) end) end)
FROM holdem_hand_player_combinations
LEFT OUTER JOIN player ON player.id_player = holdem_hand_player_combinations.id_player
WHERE player.player_name IN ('PLAYER NAME')
Is it possible to add a column to holdem_hand_player_combinations and populate the column based on a formula so instead I could just use something like:
- Code: Select all
SELECT id_f_hand_group
FROM holdem_hand_player_combinations
LEFT OUTER JOIN player ON player.id_player = holdem_hand_player_combinations.id_player
WHERE player.player_name IN ('PLAYER NAME')
