Courses.php: format SQL statement
parent
8fbf0f1d1d
commit
09301d84ca
14
Courses.php
14
Courses.php
|
@ -65,13 +65,13 @@ include 'Header.php';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($_GET["course"]))
|
if (!empty($_GET["course"])) {
|
||||||
{
|
$course_url = mysqli_real_escape_string($con, $_GET["course"]);
|
||||||
$course_url = mysqli_real_escape_string($con, $_GET["course"]);
|
$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
|
||||||
$result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`,"
|
FROM courses_table
|
||||||
. " `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` "
|
INNER JOIN users_table
|
||||||
. " , users_table.Full_Name FROM `courses_table` INNER JOIN users_table"
|
ON users_table.User_ID=courses_table.Lecturer_User_ID
|
||||||
. " ON users_table.User_ID=courses_table.Lecturer_User_ID where URL='$course_url' ");
|
WHERE URL='$course_url' ");
|
||||||
|
|
||||||
if(mysqli_num_rows($result)==0)
|
if(mysqli_num_rows($result)==0)
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
{} else { while($row = mysqli_fetch_assoc($result)) {
|
||||||
|
|
Loading…
Reference in New Issue