Jump to content

Using DISTINCT with extra fields


lemmin

Recommended Posts

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

Archived

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

×
×
  • Create New...

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.