Jump to content

Using DISTINCT with join


jeff5656

Recommended Posts

I have this query:

 

$query = "select tasks.*, users.email,  users.lname from tasks inner join users on users.id = tasks.user_id where due_date<='$curr_date'";

 

How do I retrieve records so that if there are multiple records with the same email, just select 1 of those records.  I want to generate a list containing all unique emails, not the same email listed more than once.

 

 

Link to comment
https://forums.phpfreaks.com/topic/265134-using-distinct-with-join/
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.