From aa6401c5cd42fd78b12867a39867c6edc446172b Mon Sep 17 00:00:00 2001 From: Mabasa-elexma Date: Mon, 21 Dec 2020 20:10:58 +0800 Subject: [PATCH] Mabasa Nyasha Mutyambizi 202025800045-Fixed Bug 51: Unable to find course after entering the course code. --- Courses.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Courses.php b/Courses.php index 5005494..58128f6 100644 --- a/Courses.php +++ b/Courses.php @@ -564,8 +564,9 @@ if( $_SESSION['user_type']=="Student") $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`," . " `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` " . " , users_table.Full_Name FROM `courses_table` INNER JOIN users_table" - . " ON users_table.User_ID=courses_table.Lecturer_User_ID where Course_Code='$search' and courses_table.Course_ID not in (select course_id from course_students_table where Student_ID=$student_id)"); + . " ON users_table.User_ID=courses_table.Lecturer_User_ID where Course_Code like '%{$search}%' and courses_table.Course_ID not in (select course_id from course_students_table where Student_ID=$student_id)"); } + else { echo "

Find Courses under faculty $faculty

";