Need some help with a recent SQL Error since I upgraded to vB 4.1.12 recently (from 4.1.6).
I also upgraded to the version of vbSoccer in ForceHSS's sig
The error I get when the vbSoccer Update (vbsoccer_fixtures.php) cron task runs...
Code:
Invalid SQL:
SELECT (_wr * 0) +
((_count - _wr - _rr - _rd) * 1) +
(_rd * 1) +
(_rr * 2) 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 vb_soccer_user_bet AS b
INNER JOIN vb_soccer_match AS m ON(m.id=b.match_id)
WHERE userid=3 AND score_key>0 AND match_is_finished=1
AND b.dateline > 315532800
AND m.dateline > 315532800
GROUP BY userid) AS userpoints;
MySQL Error : Unknown column 'b.dateline' in 'where clause'
The error is clear - table b, i.e. vb_soccer_user_bet, does not contain a dateline column.
Just not sure though how this SQL is being created. I thought I had narrowed down the SQL to the construct_saison_rankings() function in functions_vbsoccer.php but alas it's not the same SQL statement.
In fact I can't find where this gets created at all.
I've tried importing the product again - but no dice..
Problem I have is that the current season is in progress so I don't want to uninstall and lose all the information.
Any help in tracking down the root cause of this greatly appreciated.
TIA