SELECT DISTINCT(model_id), model.* FROM model_genel, model WHERE durum = 0 AND model.id = model_gene.model_id;