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 date<='2018-11-14'' at line 1
SELECT COUNT(id_prog) FROM and date<='2018-11-14'