How about actually using distinct?

SELECT DISTINCT(email_addr) FROM myTable WHERE x = 1

--Toby

----- Original Message ----- 
From: "Jason Caldwell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:47 AM
Subject: [PHP] mySQL Question....


> if i perform a SELECT query (say) like the following:
> 
> SELECT email_addr FROM myTable WHERE x = 1
> 
> in this query i want to pull-out (or list) all email addresses where x
> equals 1, however, suppose i don't want any duplicate email addresses...
> 
> would i use ORDER BY and COUNT(*) to get listing of non-duplicate email
> addresses, and just ignore the COUNT() ?
> 
> Thanks.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to