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 'ORDER BY KEYWORD OR CLASSNUM = 530 AND '1968'<=BEGYEAR AND '1982'>=BEGYEAR AND D' at line 1