I need a script to find Member who has a friend connection more than once so it doesn’t show their friendship more than once on the website.
The MemberConnection table is as follows:
+----------------------+------------+----------------+
| MemberConnectionID | MemberID | ConnMemberID |
+----------------------+------------+----------------+
| 25 | 33 | 43 |
| 26 | 43 | 33 |
| 27 | 13 | 143 |
| 28 | 143 | 13 |
| 29 | 33 | 43 |
+----------------------+------------+----------------+
As you can see rows 25 and 29 are identical and I need to find these duplicates so they can be deleted.
How can I write a script for this?
Any help that anyone can provide would be greatly appreciated.
Many thanks in advance
neojakey
Try this if you want to leave one connection:
Use this to select connections:
or use this to delete from table: