The query looks like this:
SELECT d.dnumber, d.cname, MIN( s.time ) AS singles, SUM( p.points ) AS points FROM dads d LEFT JOIN singles s ON s.dad = d.dnumber LEFT JOIN points p ON p.dad = d.dnumber WHERE d.cat =45 && d.payment != 'pending' GROUP BY d.dnumber ORDER BY cname
The result shows all the rows I am expecting, and everything is in order except for the 'points' result. It appears that the sum of all the points entries in the points table for a particular dad are being multiplied by the number of entries that dad is showing up in the singles table. Does that make sense?
So a dad that has 100 points and is in the singles table once = 100, which would be correct.
A dad that has 100 points and in the singles table 3 times = 300, which is incorrect and should only be the 100.