Quellcode durchsuchen

Added 'Participants Enrolled' in viewExperience.php

Victor Hernandez vor 3 Jahren
Ursprung
Commit
44c0bd3bd0
1 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen
  1. 8
    3
      viewExperience.php

+ 8
- 3
viewExperience.php Datei anzeigen

40
 	$rowProject = mysqli_fetch_assoc($resultProject);
40
 	$rowProject = mysqli_fetch_assoc($resultProject);
41
 
41
 
42
 
42
 
43
+	// FETCH NUMBER OF STUDENTS ENROLLED IN EXPERIENCE
44
+	$queryTotalStudents = "SELECT * FROM student_participate_experience WHERE id_experience = '$experienceID'";
45
+	$resultTotalStudents = mysqli_query($connection, $queryTotalStudents);
46
+	$studentCount = $resultTotalStudents->num_rows;
47
+
48
+
43
 	include_once 'header.php';
49
 	include_once 'header.php';
44
 	
50
 	
45
 ?>
51
 ?>
70
 								<h4><b style="color:#fff;">Description:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['description']; ?></span></h4>
76
 								<h4><b style="color:#fff;">Description:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['description']; ?></span></h4>
71
 								<h4><b style="color:#fff;">Type:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['type']; ?></span></h4>
77
 								<h4><b style="color:#fff;">Type:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['type']; ?></span></h4>
72
 								<h4><b style="color:#fff;">Duration:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['duration_weeks']; ?> week<?php if((int)$row1['duration_weeks'] > 1) echo "s"; ?></span></h4>
78
 								<h4><b style="color:#fff;">Duration:</b> <span style="color:rgb(216,216,216);"><?php echo $row1['duration_weeks']; ?> week<?php if((int)$row1['duration_weeks'] > 1) echo "s"; ?></span></h4>
79
+								<h4><b style="color:#fff;">Participants Enrolled:</b> <span style="color:rgb(216,216,216);"><?php echo $studentCount; ?></span></h4>
73
 							</blockquote>
80
 							</blockquote>
74
             	
81
             	
75
 						</div><!--col-->
82
 						</div><!--col-->
277
 							// ELSE, DISPLAY A MESSAGE TO THE USER LETTING THEM KNOW THEY DON'T HAVE ONE
284
 							// ELSE, DISPLAY A MESSAGE TO THE USER LETTING THEM KNOW THEY DON'T HAVE ONE
278
 							if(mysqli_num_rows($result4) > 0):
285
 							if(mysqli_num_rows($result4) > 0):
279
 							
286
 							
280
-								$queryTotalStudents = "SELECT * FROM student_participate_experience WHERE id_experience = '$experienceID'";
281
-								$resultTotalStudents = mysqli_query($connection, $queryTotalStudents);
282
-								$studentCount = $resultTotalStudents->num_rows;
287
+
283
 								
288
 								
284
 						?>
289
 						?>
285
 						<table class="table table-hover table-striped table-responsive">
290
 						<table class="table table-hover table-striped table-responsive">