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 position,id' at line 1 - 1064 - SELECT * FROM prd_product_images p WHERE product_id= ORDER BY position,id - in: chsites_niddlenoddle_live