Re: Newbie - MySQL Question - Finding Unique Names in Column
| From: | Data Driven Design | Date: | Tue, 27 Mar 2001 22:53:25 +0000 |
| Subject: | Re: Newbie - MySQL Question - Finding Unique Names in Column | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45771@lists.php.net to get a copy of this message | ||
I think you mean distict, as in
$query = "SELECT DISTINCT band_name FROM table WHERE ...";
Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084
http://www.datadrivendesign.com
http://www.rossidesigns.net
----- Original Message -----
From: Rami Krayem <rami@totalpisser.com>
To: <php-general@lists.php.net>
Sent: Tuesday, March 27, 2001 11:49 AM
Subject: [PHP] Newbie - MySQL Question - Finding Unique Names in Column
> I have a listing of photos in a table as follows (not actual column
names):
>
> Image Name, Image Width, Image Height, Band Name, Venue, City, State, Date
>
>
> I would like to have a list of the different bands with photos in the
> archive. There may be 120 photos of any one band, but I would like to
> select the name of the band only one time and have it printed in the list.
> Is there a MySQL function that would do this, or should I just put the
> different bands into a separate table?
>
> Any help would be appreciated.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>