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 9 SELECT M. * , TH.TeamName HomeTeam, TA.TeamName AwayTeam, P.FieldName, P.FieldID, MD.YellowSection, MD.RedSection, MD.SpecialIncidentSection FROM Matches M LEFT OUTER JOIN Teams TH ON M.HomeTeamID = TH.TeamID LEFT OUTER JOIN Teams TA ON M.AwayTeamID = TA.TeamID Left Outer Join Pitches P On M.FieldID = P.FieldID Left Outer JOIN MatchDiscipline MD On MD.MatchID = M.MatchID where M.MatchID =