Error: SELECT playerlist.*, substitutes.* FROM playerlist, substitutes WHERE (substitutes.lid1 = OR substitutes.lid2 = ) AND playerlist.rid = substitutes.rid ORDER by playerlist.lastname

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 substitutes.lid2 = ) AND playerlist.rid = substitutes.rid ORDER by playerlist' at line 1