SubmitLab.php: better SQL format

Bug430-Eden2
Lan Hui 2023-09-01 18:54:41 +08:00
parent 25a5c89248
commit 73f1e446cf
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ include 'Header.php';
// Giving both the Group Admin and Group Members same priviledges to submit assignment
if ($type == "Group") {
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or (Group_Leader=$student_id))");
$resultx1 = mysqli_query($con,"SELECT Course_Group_id
FROM course_groups_table
WHERE (Course_id=$Course_ID) AND ((Group_Member=$student_id ) OR (Group_Member2=$student_id ) OR (Group_Member3=$student_id ) OR (Group_Member4=$student_id ) OR (Group_Leader=$student_id))");
while ($row = mysqli_fetch_assoc($resultx1)) {
$_SESSION["Group_ID"] = $row['Course_Group_id'];
}