gknight Posted April 24, 2007 Share Posted April 24, 2007 I am trying to figure out how to extract only one of each different number from a database query that returns several duplicates of several different numbers. Example: 1,1,1,1,1,1,2,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6.......... What I want to do is extract just 1,2,3,4,5,6. Any and all help would be GREATLY appreciated. Thanks, Matt Link to comment https://forums.phpfreaks.com/topic/48500-solved-how-to-extract-1-each-of-several-multiples/ Share on other sites More sharing options...
jvrothjr Posted April 24, 2007 Share Posted April 24, 2007 "SELECT distinctrow Fieldname from tblname" or "SELECT Fieldname from tblname Group by Fieldname" Link to comment https://forums.phpfreaks.com/topic/48500-solved-how-to-extract-1-each-of-several-multiples/#findComment-237204 Share on other sites More sharing options...
gknight Posted April 24, 2007 Author Share Posted April 24, 2007 Thanks, I will give that a try. Link to comment https://forums.phpfreaks.com/topic/48500-solved-how-to-extract-1-each-of-several-multiples/#findComment-237208 Share on other sites More sharing options...
gknight Posted April 24, 2007 Author Share Posted April 24, 2007 It worked with the GROUP BY modifier. Been a few years since I have done this and I think I forgot more than I knew to begin with....... Thank you very much. Matt Link to comment https://forums.phpfreaks.com/topic/48500-solved-how-to-extract-1-each-of-several-multiples/#findComment-237215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.