This commit is contained in:
2024-05-31 13:07:37 +02:00
parent c62321f854
commit 3d8b9928d6
5 changed files with 59 additions and 146 deletions
+58
View File
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<?php include_once "../../base/meta.php" ?>
<title>Artikel</title>
</head>
<body>
<?php
include_once "../../base/settings.php";
include_once "../../base/headers.php";
Headers::html();
include_once "../../base/database.php";
$db = DB::openConnection();
$query = "
SELECT
ArtikelNr, Artikelname, Lagerbestand
FROM
Artikel
ORDER BY
ArtikelNr";
$stmt = $db->prepare($query);
$stmt->execute();
$result = $stmt->fetchAll();
DB::closeConnection($db);
?>
<div class="col">
<table class="table table-sm table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Artikelname</th>
<th scope="col">Lagerbestand</th>
</tr>
</thead>
<tbody>
<?php
foreach ($result as $item) {
?>
<tr>
<th scope="row"><?= $item["ArtikelNr"] ?></th>
<td><?= $item["Artikelname"] ?></td>
<td><?= $item["Lagerbestand"] ?></td>
</tr>
<?php
}
?>
</table>
</div>
</body>
</html>