ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 delete from ResultsTemp where DivisionID = ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 12 insert into ResultsTemp (MatchID, DivisionID, TeamID, Score, OpponentScore) SELECT MatchID, DivisionID, HomeTeamID, HomeTeamScore, AwayTeamScore FROM Matches where HasBeenPlayedBoolean = 1 and IsAnExhibition = 0 and DivisionID = ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 12 insert into ResultsTemp (MatchID, DivisionID, TeamID, Score, OpponentScore) SELECT MatchID, DivisionID, AwayTeamID, AwayTeamScore, HomeTeamScore FROM Matches where HasBeenPlayedBoolean = 1 and IsAnExhibition = 0 and DivisionID =