ssjskipp Posted June 24, 2006 Share Posted June 24, 2006 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 11 |ssj |Pic 22 |zT |Pic 33 |awesty |Pic 4[!--fontc--][/span][!--/fontc--]and when it displys, I wantzTssjawestybut in no particular order Quote Link to comment https://forums.phpfreaks.com/topic/12781-help/ Share on other sites More sharing options...
DylanBlitz Posted June 24, 2006 Share Posted June 24, 2006 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 Link to comment https://forums.phpfreaks.com/topic/12781-help/#findComment-48989 Share on other sites More sharing options...
ssjskipp Posted June 24, 2006 Author Share Posted June 24, 2006 [!--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 ^_^ Quote Link to comment https://forums.phpfreaks.com/topic/12781-help/#findComment-48991 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.