non e' chiarissima la cosa...

per cercare quelli che sono diversi:

where id_comun NOT IN($id_com) oppure
where id_comun != da $id_com