-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_lecturers_report.php
64 lines (59 loc) · 3.41 KB
/
view_lecturers_report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php include'header.php'; ?>
<div class="pcoded-content">
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-body">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header table-card-header">
<h5>View the number of courses taken by each lecturer</h5>
</div>
<div class="card-block">
<div class="dt-responsive table-responsive">
<table id="basic-btn" class="table table-striped table-bordered nowrap">
<thead>
<tr>
<th>#</th>
<th>Lecturer</th>
<th>Total classes</th>
<th>Total Duration</th>
</tr>
</thead>
<tbody>
<?php
$sql =mysqli_query($db, "select * from vw_lecturer_view order by surname");
$sn= 0;
while($result = $sql -> fetch_assoc()){
$total_duration=$result['SUM(duration)'];
$total_clasess=$result['COUNT(lecturer_id)'];
$venue= mysqli_fetch_assoc(mysqli_query($db, "select * from venue where venue_id=".$result['venue_id']));
$sn++; ?>
<tr>
<td><?php echo $sn; ?></td>
<td><?php echo $result['surname']; ?></td>
<td><?php echo $total_clasess;?></td>
<td><?php echo $total_duration; ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<th>#</th>
<th>Lecturer</th>
<th>Total classes</th>
<th>Total Duration</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include'footer_view.php'; ?>