jeff5656 Posted July 3, 2012 Share Posted July 3, 2012 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 More sharing options...
jeff5656 Posted July 3, 2012 Author Share Posted July 3, 2012 I figured it out - no need for distinct, I used group by. Link to comment https://forums.phpfreaks.com/topic/265134-using-distinct-with-join/#findComment-1358735 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.