Re: Check for duplicates

From: Date: Fri, 01 Dec 2000 23:41:24 +0000
Subject: Re: Check for duplicates
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-28324@lists.php.net to get a copy of this message
> Since I haven't taken the time to fully analyze your code, I'm not sure what > it's trying to do. Are you trying to find duplicates? You can use GROUP BY > clause in a query to find them much quicker: > SELECT email, count(*) FROM TableName GROUP BY email; You know, there's a funny bit. I can't seem to get a select statement to work with any sort of function with parentheses in it. Like, if I did: $sql = "SELECT upper(email) FROM tablename"; $result = mysql_query($sql); I get an error at worst, unexpected results at best. I have yet to see the count() function work. Has anyone ever seen that happen? I admit I'm not a wiz but, jeez, I'm not a moron (I think) either. Do you suppose that there's something about the way either PHP or MySQL is installed that screwing me up? Yours, Murph

« previous php.general (#28324) next »