Hello i have a Mysql statement that supposes to return to results.
The statement is
SELECT c.user_one,c.user_two,c.c_id,r.reply
FROM conversation_reply r
JOIN conversation c ON r.c_id_fk = c.c_id
WHERE c.user_one = '3'
OR c.user_two = '3'
GROUP BY r.reply
I have only two records in the table so the result should be:
user_one user_two c_id reply
2 1 43 Hello One
1 2 43 Hello Two
Instead its like
user_one user_two c_id reply
2 1 43 Hello One
2 1 43 Hello Two
If i loose the GROUP BY it returns 4 records but i only have two, like this
user_one user_two c_id reply
1 2 43 Hello One
2 1 43 Hello Two
1 2 43 Hello One
2 1 43 Hello Two
Any idea why?