You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY order_img' at line 1
SELECT id_img, REPLACE(image_img, 'https', 'http') AS image_img, alt_fr_img as alt FROM properties_images WHERE property_img = '8627' AND id_img NOT IN() ORDER BY order_img