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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.