montymoose
Posts: 85
|
| Posted: 08/06/2007, 5:28 AM |
|
Another quick little query if you have 2 minutes:
If I have a simple table which returns the following rows:
Red
Red
Red
Green
Blue
Blue
Purple
How can I use PHP - MySQL to remove the repeated items, returning just the following:
Red
Green
Blue
Purple
Any suggestions most welome,
Thanks,
John,
|
 |
 |
Hidran
|
| Posted: 08/06/2007, 6:04 AM |
|
Use GROUP BY color_column.
Hidran
"montymoose" <montymoose@forum.codecharge> ha scritto nel messaggio
news:546b713e801594@news.codecharge.com...
> Another quick little query if you have 2 minutes:
>
> If I have a simple table which returns the following rows:
>
> Red
> Red
> Red
> Green
> Blue
> Blue
> Purple
>
> How can I use PHP - MySQL to remove the repeated items, returning just the
> following:
>
> Red
> Green
> Blue
> Purple
>
> Any suggestions most welome,
>
> Thanks,
>
> John,
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
datadoit.com
|
| Posted: 08/06/2007, 6:42 AM |
|
SELECT DISTINCT
|
|
|
 |
|