I have a very simple rating system in my database where each rating is stored as an enum(\'1\',\'-1\'). To calculate the total I tried using this statement:
This conversion to int in MySQL for enum is only possible:
int
enum
CAST(CAST(`rating` AS CHAR) AS SIGNED) as value from table WHERE _id = 1