SELECT id, IFNULL(image_s2, CONCAT(id,'-s2.jpg')) AS image, title, sale_status FROM stock WHERE artist_id = AND deleted = 0 ORDER BY FIELD(sale_status,'S','R', 'A')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 'AND deleted = 0 ORDER BY FIELD(sale_status,'S','R', 'A')' at line 6