Jump to content

MySQL, ENUM sends me back either index or something else


Guest Job Van Dam
 Share

Recommended Posts

Guest Job Van Dam

In my MySQL table I have a column that's called G1_Wins datatype enum('0','1') and G1_Losses datatype enum ('0','1').Pretty straight forward, I make G1_Wins '0' and G1_Losses '1' if a players lose the game OR G1_Wins '1' and G1_Losses '0' if a player wins the game.I am storing 8 games like that. I wanna add them all up to see how many games the player played. If I add G1_Wins to G1_Losses I get 3.I've tried using brackets, +0 and if I just select G1_Wins I get back either a 1 or 0.I want the actual enum value returned not the index or whatever else is being returned.Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...