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 'and dbo_tblMain2.bigevent = 'NEWTEACHERPRI' and year(dbo_tblMain2.Date) = '2020' at line 1