Re: [Bulk] [PHP] Creating A Unique List With Table Query

From: Date: Tue, 10 Feb 2009 19:46:37 +0000
Subject: Re: [Bulk] [PHP] Creating A Unique List With Table Query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-288083@lists.php.net to get a copy of this message
revDAVE wrote:
I would like to be able to query a table, and return only the unique values from a particular field. For example: to get all contents from the category field from the contacts table: Query = .... SELECT Category FROM contacts But this will produce many duplicates. Question : How do I filter the query to only produce unique values? Check out the "DISTINCT" keyword in the SELECT documentation.
Also, do you have a "Category" table? Stephen

« previous php.general (#288083) next »