diff --git a/schoolinvite.php b/schoolinvite.php
index 6341205..a3cf29e 100644
--- a/schoolinvite.php
+++ b/schoolinvite.php
@@ -96,7 +96,8 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
$datecheck=mysql_fetch_object($q);
- $q=mysql_query("SELECT students.*,
+ $q=mysql_query("SELECT
+ students.*,
registrations.num,
registrations.emailcontact
FROM
@@ -106,13 +107,13 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
students.schools_id='".$school->id."'
AND students.year='".$config['FAIRYEAR']."'
AND students.registrations_id=registrations.id
+ GROUP BY registrations.num
ORDER BY
lastname,
firstname");
$currentinvited=mysql_num_rows($q);
- if($datecheck!=0)
- {
+ if($datecheck!=0) {
echo i18n("In order for your school's students to register for the fair, you will need to invite them to register. Simply enter their email address below to invite them to register. Important: for group projects, only add one of the participants, that participant will then add the other group member(s) to the project");
echo "
";
echo "
";
@@ -150,6 +151,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
AND students.grade<='$catr->maxgrade'
AND students.year='".$config['FAIRYEAR']."'
AND students.registrations_id=registrations.id
+ GROUP BY registrations.num
");
echo mysql_error();
$r2=mysql_fetch_object($q2);
@@ -226,6 +228,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
echo "