Getting one of each result from MySQL

From: Date: Fri, 13 Apr 2001 05:14:15 +0000
Subject: Getting one of each result from MySQL
Groups: php.general 
Request: Send a blank email to php-general+get-48409@lists.php.net to get a copy of this message
I need to query a MySQL database with something like: "select guild from table_name" I'm going to take "guild" and eventually make a drop-down box with the information, but that I can handle. The thing is, I want to have only one entry for each guild, and I want them to be in alphabetical order. My current idea is to read all the results into an array with a while loop, then use array_unique on it, then run sort on that. Is this really the best way to do it, or am I missing a simpler solution? -- Plutarck Should be working on something... ...but forgot what it was.

« previous php.general (#48409) next »