If i wanted to just list all the data in a field by using the select function... is there a way i can do this without it showing duplicates..? like if theres 2 of something it will just show 1
Selecting Data From a DB
Started by grimcoder, Oct 30 2009 10:58 AM
4 replies to this topic
#1
Posted 30 October 2009 - 10:58 AM
#2
Posted 30 October 2009 - 01:31 PM
I think you're looking for:
SELECT DISTINCT
#3
Posted 30 October 2009 - 01:50 PM
Can you give us a bit more detail as to what you want? I'm not quite sure I get what you are saying
#4
Posted 02 November 2009 - 12:27 PM
You could group....
A basic example of this could be an awards system. Rather than showing every award (including duplicates) it shows the awards but no repeats.
Select * from `your_dbtable` GROUP BY yourfield
A basic example of this could be an awards system. Rather than showing every award (including duplicates) it shows the awards but no repeats.
#5
Posted 02 November 2009 - 01:24 PM
http://www.w3schools...ql_distinct.asp
taken straight from w3s
taken straight from w3s
SELECT DISTINCT column_name(s) FROM table_name
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
