I've tried to search answer here, there are few questions are quite similar with my question but i still can't figure out how to GROUP BY below.
MYSQL Structure:
ID | USERID | FRIENDID
1 | 14 | 65
2 | 65 | 14
3 | 12 | 19
4 | 19 | 12
How to GROUP BY ID 1 & ID 2 and ID 3 & ID 4 with php query?
Result:
1. 14 & 65
2. 12 & 19
GROUP BYto group by two different values. Do you just want to return the relationships (i.e. user 14 is related to 65)?USERIDis already existing inFRIENDID?USERIDandFRIENDIDfields, rather than theID?