Errore: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 validToDate >= DATE('2020-10-20')' at line 1
Query:SELECT * FROM (tb_coupon cp INNER JOIN tb_program pr ON cp.id_program=pr.id_program) INNER JOIN tb_category ct ON cp.id_category=ct.id_category WHERE ct.id_category= AND validToDate >= DATE('2020-10-20')