-
Notifications
You must be signed in to change notification settings - Fork 0
/
name.php
43 lines (40 loc) · 852 Bytes
/
name.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
<?php
include('./sql/connect.php');
$sql = "SELECT name FROM schueler WHERE schuelerId = 1";
$result = $db->query($sql);
?>
<html>
<body>
<table>
<tr>
<td><?php
while ($row = $result->fetch_object()) {
$name = $row->name;
?>
<td><?php echo $name; ?></td>
<?php
}
?></td>
</tr>
</table>
<?php
$sql1 = "SELECT * FROM pruefung WHERE pruefungId = 6";
$sql2 = "SELECT pruefung.pruefungId, schueler.name FROM pruefung JOIN schueler";
$result1 = $db->query($sql2);
?>
<table>
<tr>
<td><?php
while ($row = $result1->fetch_object()) {
$name = $row->pruefungId;
$name = $row->name;
?>
<td><?php echo $name; ?></td>
<td><?php echo $name; ?></td>
<?php
}
?></td>
</tr>
</table>
</body>
</html>