I have been scratching my head on this and have done some google searches but can't figure out why this query returns the wrong SUM.
$points = $wpdb->get_results("Select SUM(points) as points from $sc WHERE division_id = '$divid' and participant_id = '$partid' and status = '1'");
If I go to the database and run just the following, it will work perfectly exactly how I need it to. But if I put it in the Wordpress Query Get_Results format, it returns wrong information.
Select SUM(points) as points from $sc WHERE division_id = '$divid' and participant_id = '$partid' and status = '1'
What am I Missing, does Wordpress utilize SUM differently?