source: inc/analytics-table-2.php

Last change on this file was 0791611, checked in by sstalevska <sara.stalevska@…>, 2 years ago

Push the entire project.

  • Property mode set to 100644
File size: 835 bytes
Line 
1<h2 class="mt-5"><?= $quarterTitle ?> Quarter</h2>
2<table class="table">
3 <thead>
4 <tr>
5 <th>Reviewer Name</th>
6 <th width="1">Number&nbsp;of&nbsp;reviews</th>
7 </tr>
8 </thead>
9 <tbody>
10 <?php
11 /**
12 * Fetch the number of reviews left by each reviewer for this quarter and display them in the table.
13 */
14 $i = 0;
15 $sql = 'SELECT reviewer_name, ' . $quarterId . ' FROM num_of_reviews_by_reviewer_by_trimester ORDER BY ' . $quarterId . ' DESC, reviewer_name';
16 foreach ($conn->query($sql) as $row) {
17 $i++;
18 ?>
19 <tr>
20 <td><?= $row['reviewer_name'] ?></td>
21 <td class="text-end"><?= number_format($row[$quarterId], 2) ?></td>
22 </tr>
23 <?php } ?>
24 </tbody>
25</table>
Note: See TracBrowser for help on using the repository browser.