-
Notifications
You must be signed in to change notification settings - Fork 1
/
covid_pos.php
48 lines (40 loc) · 1.59 KB
/
covid_pos.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
<?php
echo '<div class="d-none">'; #Bootstrap 'd-none' as mysql_connect is an old syntax.
$conn=mysql_connect('localhost','root',''); #for wampserver/xampserver user
$db=mysql_select_db('dbms_pr');
echo '</div>';
#---------------------------- BED_LOG: Display, it contains every positive patient who is allotted a bed ----------------------------------------------
$qry="SELECT STUDENT.NAME,BED_LOG.ROLL,BED_LOG.IN_DATE,BED_LOG.OUT_DATE,STUDENT.phone_number FROM STUDENT, BED_LOG WHERE STUDENT.ROLL=BED_LOG.ROLL";
$result=mysql_query($qry);
$num=mysql_num_rows($result);
#Bootstrap stripped table design
echo '<div class="mt-lg-5 row row-content justify-content-center">
<div class="col-7"
<div class="table-responsive">
<table class="table table-striped" style="overflow-y: scroll; display:block;" height="400">
<thead class="thead-dark">
<tr>
<th> Name </th>
<th><center> Roll </center></th>
<th><center> In Date </center></th>
<th><center> Out Date </center></th>
<th> Phone number</th>
</tr>
</thead>
';
#------------------------------------------------ Displaying contents of the table -------------------------------------------------------------------
if($num>0){
while($row=mysql_fetch_assoc($result)){
echo '<tr>
<td>'.$row['NAME'].'</td>
<td>'.$row['ROLL'].'</td>
<td>'.$row['IN_DATE'].'</td>
<td>'.$row['OUT_DATE'].'</td>
<td>'.$row['phone_number'].'</td>
</tr>';
}
echo "</table></div></div>";
}
#No positive patients as of now.
else echo"SORRY!! NO DATA<br>";
?>