Invalid query:
Error Number: 1064
Error Message: 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 tbl_product_image.active = 1
ORDER BY tbl_product_image.position' at line 5
Whole query:
SELECT tbl_product_image.imageid, tbl_product_image.comment
FROM tbl_image
INNER JOIN tbl_product_image ON tbl_product_image.imageid = tbl_image.imageid
WHERE productid =
AND tbl_product_image.active = 1
ORDER BY tbl_product_image.position