Sorry for the crappy title – didn’t know how else to say it.
I have a commenting database where anyone can report a comment for abuse (anyone as in not just logged in members). This obviously means a person could report a comment multiple times. Where I need help is building a query that shows the number of times a comment has been reported but by unique email address AND ip address.
I’m not sure if that is clear or not — if joe@joe.com of IP address 1.2.3.4 reports a message more than once, it will only count as one report. If there is an additional record of joe@joe.com with an IP of 4.5.6.7 reporting the same comment, it would count as two reports since the IPs are different.
The fields, all in one table:
- id
- comment_id
- note
- ip_address
I hope that all makes sense and any help would be GREATLY appreciated!
Update:
As per your comment, I believe you want this: