x108/H4.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php include ('db.php'); $queryll = "select * from leerlingen"; $resultll = mysqli_query($db,$queryll) or die(mysqli_error($db)); while ($row = mysqli_fetch_array($resultll)){ $queryboeken = "select * from boeken b, uitleningen u where b.boeknr=u.boeknr and u.llnr=$row[llnr] order by u.datum_uit"; $resultboeken = mysqli_query($db,$queryboeken) or die(mysqli_error($db)); echo "\n<div><h2>$row[voornaam] $row[tussenvoegsel] $row[achternaam] ($row[llnr])</h2></div>"; echo '<blockquote>'; while ($key = mysqli_fetch_array($resultboeken)){ $datum = strtotime($key['datum_uit']); $datum = strftime('%e %b %Y', $datum); echo "<div>$key[titel] geleend op $datum</div>"; } echo '</blockquote>'; } ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse