Jump to content


Photo

HELP!


  • Please log in to reply
2 replies to this topic

#1 ssjskipp

ssjskipp
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 24 June 2006 - 04:04 AM

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

#2 DylanBlitz

DylanBlitz
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationOC Baby!

Posted 24 June 2006 - 04:50 AM

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]

#3 ssjskipp

ssjskipp
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 24 June 2006 - 05:00 AM

[!--quoteo(post=387368:date=Jun 24 2006, 12:50 AM:name=DylanBlitz)--][div class=\'quotetop\']QUOTE(DylanBlitz @ Jun 24 2006, 12:50 AM) View Post[/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 ^_^




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users