diff --git a/admin/reports_students.inc.php b/admin/reports_students.inc.php index e5524262..60b4bb7e 100644 --- a/admin/reports_students.inc.php +++ b/admin/reports_students.inc.php @@ -472,9 +472,10 @@ $report_students_fields = array( } $q = " FROM - students $partner_join, schools, projects $awards_join, projectdivisions, projectcategories, registrations + JOIN students ON students.registrations_id=registrations_id + $partner_join $emergencycontact_join $tour_join WHERE @@ -482,7 +483,6 @@ $report_students_fields = array( AND projects.registrations_id=students.registrations_id AND projectdivisions.id=projects.projectdivisions_id AND projectcategories.id=projects.projectcategories_id - AND registrations.id=students.registrations_id AND (registrations.status='complete' OR registrations.status='paymentpending') AND students.year='$year' AND projects.year='$year'