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 'WHERE domein_code='spon' AND box_soort='B' AND datum_van<='20200228' AND datum_t' at line 1