select count(*) from product_t a1
vs_date = '2024-12-19' where a1.pt_show = 'Y' and a1.pt_sale_now = 'Y' and a1.ct_id in (197)
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 'vs_date = '2024-12-19' where a1.pt_show = 'Y' and a1.pt_sale_now = 'Y' and a1...' at line 2