Page 1 of 1

removing doubles from mysql_query results.

Posted: Wed Mar 05, 2003 10:19 am
by VisionsOfCody
Hi
this is probably dead simple but i CAN'T find the answer - i have a column in my table that has the same entry on several lines - what i'd like to do is just have one of each type of entry in the <select> list generated using the results.
How can i test the results to get rid of the 'clones' in the results?
thanks muchly
:D

Posted: Wed Mar 05, 2003 10:27 am
by hedge
You probably want to do a select distinct...

Posted: Wed Mar 05, 2003 10:41 am
by puckeye
Or you could use GROUP BY column in your query.

Posted: Wed Mar 05, 2003 11:43 am
by VisionsOfCody
Thanks Puckeye and Hedge!
SELECT DISTINCT - brilliant!! - that did the job!!
thanks :D :D