从MySQL查询中删除重复的结果 [英] Delete repeated results from MySQL query
本文介绍了从MySQL查询中删除重复的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
MySQL查询检索:
A MySQL query retrieves:
totalpoints -- name
55 -- John Doe
55 -- John Doe
55 -- John Doe
55 -- John Doe
55 -- John Doe
21 -- Jean London
21 -- Jean London
13 -- Mark Derry
13 -- Mark Derry
13 -- Mark Derry
13 -- Mark Derry
4 -- Lara Croft
1 -- Ryan Mirtle
1 -- Ryan Mirtle
1 -- Ryan Mirtle
我只需要在php页面中显示:
I need to show in a php page just:
totalpoints -- name
55 -- John Doe
21 -- Jean London
13 -- Mark Derry
4 -- Lara Croft
1 -- Ryan Mirtle
如何摆脱重复的结果? 非常感谢
How can I get rid off the repeated results? Thanks a lot
推荐答案
使用DISTINCT怎么办? 似乎很容易... 但是您实际上尝试过使用Google吗? ou会很快找到它的.
What about using DISTINCT? Seems pretty easy... But you actually tried to google it? ou would have found it in no time.
这篇关于从MySQL查询中删除重复的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文