SELECT * FROM resimler WHERE id NOT IN 
(SELECT resim_id FROM votes WHERE user_id='".$uidi."')
bu şekilde dener misiniz?