lemmin Posted November 9, 2010 Share Posted November 9, 2010 I am trying to get a result where field1 and field2 are not duplicates. I am able to do this by using SELECT DISTINCT field1, field2. Now I want to join a table to the result on the id fields that represent each row. How can I do that? Adding the id field to the select clause changes the result because it is included in the DISTINCT qualifier. Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/218228-using-distinct-with-extra-fields/ Share on other sites More sharing options...
lemmin Posted November 9, 2010 Author Share Posted November 9, 2010 Oh, never mind. I guess grouping by multiple fields has the same affect. I didn't expect it to work that way. Link to comment https://forums.phpfreaks.com/topic/218228-using-distinct-with-extra-fields/#findComment-1132361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.