重复的结果

so basically im working with 2 different tables and i don't want to repeat the results, what im getting now is some results are duplicated, same person, different photos. I know its something rather stupid and ive done this several times, I just can't figure it out now(sometimes happens no?!).

$res=$base->query_simple("SELECT g.id, g.available, g.name, g.age, g.tagline, p.photo FROM ".$base->array_tables[2]." AS g, ".$base->array_tables[3]." as p WHERE p.id_girl=g.id AND available=1 AND active=1 LIMIT 3");

GROUP BY g.name did work so yeah, happy days!