On Sat, 2003-11-01 at 16:29, Robb Kerr wrote:
> It's not exactly a Php problem, but MySQL and Php seem to be so intertwined
> and this newsgroup has been so unbelievably helpful that I thought I'd post
> the question here.
> 
> I've got a query which returns a group of records. the field which I want
> to display in a list contains many duplicates. I need to remove all
> duplicates so that each entry is only displayed once. Another query based
> upon a selection from this list will display all of the appropriate
> records.
> 
> Can anybody help with the syntax? Do I need a loop or is there a MySQL
> command/function which I am overlooking?
> 
> Thanx,
> -- 
> Robb Kerr
> Digital IGUANA
> Helping Digital Artists Achieve their Dreams
> http://www.digitaliguana.com
> http://www.cancerreallysucks.org

You'll want to do a SELECT DISTINCT rather than simply a SELECT for your
SQL query.

SELECT DISTINCT filters out duplicate results from a query.  Hope this
helps.

- Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to