dqyat62284 2016-08-15 10:47 采纳率: 0%
浏览 11
已采纳

重复的结果

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");
  • 写回答

1条回答 默认 最新

  • dongpi9164 2016-08-15 11:25
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?