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 ')' at line 1
query=select products_atts.product_id, colors.color_code from products_atts inner join colors on products_atts.color_id=colors.color_id where products_atts.color_id > 0 and products_atts.product_id in ()