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 ') limit 10' at line 1
select id,classid,title,image_small_url,image_big_url,infotags from ***_ecms_photo_data_handle WHERE id != 6033 AND id NOT IN () limit 10