Admin.php: remove superfluous if statement.
parent
12239d9a29
commit
93ba7d4389
36
Courses.php
36
Courses.php
|
@ -375,34 +375,38 @@ course_ta ON course_ta.Course_ID=courses_table.Course_ID where course_ta.TA=$use
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mysqli_num_rows($result)==0)
|
if(mysqli_num_rows($result) != 0)
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
{
|
||||||
$id=$row['Course_ID'];
|
while($row = mysqli_fetch_assoc($result)) {
|
||||||
$name=$row['Course_Name'];
|
$id=$row['Course_ID'];
|
||||||
$code=$row['Course_Code'];
|
$name=$row['Course_Name'];
|
||||||
$faculty=$row['Faculty'];
|
$code=$row['Course_Code'];
|
||||||
$lecturer=$row['Full_Name'];
|
$faculty=$row['Faculty'];
|
||||||
$academic=$row['Academic_Year'];
|
$lecturer=$row['Full_Name'];
|
||||||
$url=$row['URL'];
|
$academic=$row['Academic_Year'];
|
||||||
|
$url=$row['URL'];
|
||||||
|
|
||||||
$resultTA = mysqli_query($con,"SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
|
$resultTA = mysqli_query($con,"SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
|
||||||
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
||||||
where course_ta.Course_ID=$id");
|
where course_ta.Course_ID=$id");
|
||||||
|
|
||||||
$ta="";
|
$ta="";
|
||||||
while($rowTA = mysqli_fetch_assoc($resultTA)) {
|
while($rowTA = mysqli_fetch_assoc($resultTA)) {
|
||||||
$ta=$ta." - ".$rowTA['TA_NAME'];
|
$ta=$ta." - ".$rowTA['TA_NAME'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo" <a href='~\..\Courses.php?course=$url'>
|
echo" <a href='~\..\Courses.php?course=$url'>
|
||||||
<div class='btn btn-default'>
|
<div class='btn btn-default'>
|
||||||
($code) - $name
|
($code) - $name
|
||||||
<p class='text-muted'><small> Faculty: $faculty Year: $academic Lecturer:$lecturer TA:$ta </small></p>
|
<p class='text-muted'><small> Faculty: $faculty Year: $academic Lecturer:$lecturer TA:$ta </small></p>
|
||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
|
|
||||||
}}?>
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<br>
|
<br>
|
||||||
|
|
Loading…
Reference in New Issue