Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

ssjskipp

HELP!

Recommended Posts

Well, I have a database with a ton of art entries, each with their own artist, but there's many by the same artist.
How can I select everything, but just display the unique artists?
Tabe:
[!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]
ID |Author |Title
----------------------
0 |zT |Pic 1
1 |ssj |Pic 2
2 |zT |Pic 3
3 |awesty |Pic 4
[!--fontc--][/span][!--/fontc--]
and when it displys, I want
zT
ssj
awesty

but in no particular order

Share this post


Link to post
Share on other sites
You'd do a select DISTINCT(author), that'll give you one of each.

[a href=\"http://dev.mysql.com/doc/refman/4.1/en/distinct-optimization.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/dis...timization.html[/a]

Share this post


Link to post
Share on other sites
[!--quoteo(post=387368:date=Jun 24 2006, 12:50 AM:name=DylanBlitz)--][div class=\'quotetop\']QUOTE(DylanBlitz @ Jun 24 2006, 12:50 AM) [snapback]387368[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You'd do a select DISTINCT(author), that'll give you one of each.

[a href=\"http://dev.mysql.com/doc/refman/4.1/en/distinct-optimization.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/dis...timization.html[/a]
[/quote]
Thanks man ^_^

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.