CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Removing replicated records

Print topic Send  topic

Author Message
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,
View profile  Send private message
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

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.