-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshow_stadium_stat.php
71 lines (46 loc) · 2.34 KB
/
show_stadium_stat.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
65
66
67
68
69
70
71
<?php
include("include/visitorheader.php");
?>
<h1>Leaderboard</h1>
<ul class="nav nav-tabs">
<li ><a href="show_best_player_stat.php">Best Player</a></li>
<li class="active"><a href="show_stadium_stat.php">Popular Venue</a></li>
<li ><a href="show_goal.php">Top Scorer</a></li>
<li><a href="show_assist.php">Top Assist</a></li>
<li><a href="show_card.php">Most Indisciplined</a></li>
<li><a href="show_officials_stats.php">Best Officials </a></li>
</ul>
<?php
$db = oci_connect('system','1234','xe');
$sql="select stadium_id,count(*) from matches group by stadium_id order by count(*) desc";
$result=oci_parse($db,$sql);
oci_execute($result);
echo ("<table class = \"table table-bordered\" style= \"text-align:center; background: black;color:white; border-radius:10px\" >");
echo " <tr>
<th>Stadium Name</a></th>
<th>Capacity</a></th>
<th>City</a></th>
<th>Matches Held</a></th>
</tr>";
while($row=oci_fetch_array($result))
{
$std=$row[0];
$mtc=$row[1];
$sql1="select stadium_name,capacity,city from stadiums where stadium_id={$std}";
$result1=oci_parse($db,$sql1);
oci_execute($result1);
while($row1=oci_fetch_array($result1))
{
echo "<tr>
<td> {$row1[0]} </td>
<td> {$row1[1]} </td>
<td> {$row1[2]} </td>
<td> {$mtc} </td>
</tr>";
}
}
echo "</table>";
?>
<?php
include("include/visitorfooter.php");
?>