You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND Cancelled=0 AND RoleNum=1 AND SummerSchool=1 AND Confirmed=1' at line 2