A Database Error Occurred

Error Number: 1064

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 'OR AwayTeam = )' at line 5

SELECT * FROM (`football`.`seasons`) JOIN `football`.`matchstats` ON `seasons`.`SsnNo` = `matchstats`.`SsnNo` WHERE `URL_SsnName` = '1989_1990' AND (HomeTeam = OR AwayTeam = )

Filename: G:\footymad\www.footymad.net\system\database\DB_driver.php

Line Number: 328