php/mysql blues...
Date: 11/17/07
(Web Development) Keywords: no keywords
I'm having some trouble getting a query right. I'm hoping that someone here can help me.
I'm doing this on a 3.23 server btw.
I have a table that has three columns, mail_from, mail_to, ip_address.
I'd like a list of instances where there are multiple duplicate mail_from and mail_to entries, but different ip_addresses.
The trouble that I'm running into is limiting it by a count of multiple columns. It can't just be multiple instances of one column, it has to be the combination of the two.
so if the table looked like
mail_from - mail_to - ip_address
a@a.com - b@b.com - 3
a@a.com - b@b.com - 4
c@a.com - b@b.com - 2
b@a.com - a@a.com - 2
d@d.com - a@a.com - 3
I would get back
a@a.com - b@b.com - 3
a@a.com - b@b.com - 4
If anybody could give me a hand with this, I'd appreciate it alot. If you need any clarification on what I'm asking for feel free to post questions.
Thanks!
Source: http://community.livejournal.com/webdev/448341.html