I'm getting an sql error on the rankings page for the English Premier League. It is ok for the other league I have set up on my forum.
Here is what my error is:
Quote:
Database error in vBulletin 3.8.8:
Invalid SQL:
SELECT
b.`userid`, `match_day`,
COUNT(*) AS `bets`,
SUM(`score_key`>0) AS 'evaluated',
SUM(`score_key`>0 AND `score_key` != `bet_score_key`) AS 'wr',
SUM(`score_key`>0 AND `bet_home`=`points_home` AND `bet_away`=`points_away`) AS 'rr',
SUM(`score_key`>0 AND 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 `soccer_user_bet` b
INNER JOIN `soccer_match` m ON (m.`id`=b.`match_id`)
WHERE m.`league_id`=32 GROUP BY `match_day`, b.`userid`;
MySQL Error : BIGINT UNSIGNED value is out of range in '(`dbname_dbforum`.`b`.`bet_home` - `dbname_dbforum`.`b`.`bet_away`)'
Error Number : 1690
Request Date : Sunday, August 9th 2015 @ 10:51:44 AM
Error Date : Sunday, August 9th 2015 @ 10:51:44 AM
Script : http://www.myurl.com/forum/vbsoccer....enumber=1&l=32
Referrer : http://www.myurl.com/forum/vbsoccer....=35&do=ranking
IP Address : 109.79.231.253
Username : xxxx
Classname : vB_Database
MySQL Version : 5.6.23
|
Has anyone got any suggestions on how to fix this?