Hi,
receive this error when user view the page Soccer betting
Code:
Invalid SQL:
SELECT (_wr * 0) +
((_count - _wr - _rr - _rd) * 1) +
(_rd * 2) +
(_rr * 3) AS points
FROM (
SELECT userid, COUNT(*) AS _count,
SUM(score_key != bet_score_key) AS _wr,
SUM(bet_home=points_home AND bet_away=points_away) AS _rr,
SUM(CAST(bet_home - bet_away AS SIGNED)=(points_home - points_away)
AND NOT (bet_home = points_home AND bet_away = points_away)) AS _rd
FROM HG_soccer_user_bet AS b
INNER JOIN HG_soccer_match AS m ON(m.id=b.match_id)
WHERE userid=1 AND score_key>0 AND match_is_finished=1
GROUP BY userid) AS userpoints;
MySQL Error : BIGINT UNSIGNED value is out of range in '(`hardware_Hardwaregame`.`b`.`bet_home` - `hardware_Hardwaregame`.`b`.`bet_away`)'
Error Number : 1690
Help me
thx