Error: SELECT * from product p INNER JOIN product_category pc ON p.cid=pc.cid where pc.active = 1 and p.active = 1 and p.cid in () and ('2025-04-03 15:00:48' between p.start_date and p.end_date or (p.start_date is null and p.end_date is null ) ) and (p.expire_type = 0 or (p.expire_type = 1 and '2025-04-03' between p.product_use_date and p.product_expire_date) ) ORDER BY pc.sort,p.sort ASC
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 ('2025-04-03 15:00:48' between p.start_date and p.end_da' at line 4