You have an error in your SQL syntax near 'ORDER BY id_photo ASC' at line 1