-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurrentparks.php
executable file
·50 lines (47 loc) · 1.59 KB
/
currentparks.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
<?php session_start();
$sql = "select count(distinct parkid) as parkcnt from ospotalog where parkid <> 76";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$workedparkcnt = $row["parkcnt"];
}
$sql = "select count(ospotaparkid) as parkcnt from ospotaparks where ospotaparkid not in (select distinct parkid from ospotalog) and ospotaparkid <> 76";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$parkcnt = $row["parkcnt"];
}
echo "<table border=0>";
echo "<tr><td valign = top>";
echo "<b>Parks Worked (" . $workedparkcnt . ")</b><br>";
echo "<table border = 1>";
echo "<tr>";
echo "<th>Park ID</th><th>Park Name</th>";
echo "</tr>";
$sql = "select * from ospotaparks where ospotaparkid in (select distinct parkid from ospotalog) and ospotaparkid <> 76 order by parkname";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . $row["parkid"] . "</td>";
echo "<td>" . $row["parkname"] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "</td>";
echo "<td valign = top>";
echo "<b>Parks to be Worked (" . $parkcnt . ")</b><br>";
echo "<table border = 1>";
echo "<tr>";
echo "<th>ParkID</th><th>Park Name</th>";
echo "</tr>";
$sql = "select * from ospotaparks where ospotaparkid not in (select distinct parkid from ospotalog) and ospotaparkid <> 76 order by parkname";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . $row["parkid"] . "</td>";
echo "<td>" . $row["parkname"] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>