-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNumber5.php
More file actions
40 lines (33 loc) · 834 Bytes
/
Number5.php
File metadata and controls
40 lines (33 loc) · 834 Bytes
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
<?php
ini_set ('error_reporting', 1);
try {
require_once('/pdo_connect.php');
$sql = "SELECT MovieID, CSC355SP26Movies.GetIMDbRating(MovieID) AS 'Rating'
FROM CSC355SP26Movies.Movie";
$result = $dbc->query($sql);
} catch (PDOException $e) {
echo $e->getMessage();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>One Stored Function</title>
</head>
<body>
<h2>One Stored Function</h2>
<table>
<tr>
<th>Movie ID</th>
<th>IMDb Rating</th>
</tr>
<?php foreach ($result as $row) {
echo "<tr>";
echo "<td>".$row['MovieID']."</td>";
echo "<td>".$row['Rating']."</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>