admin
DVD liste
connect_error) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$sth = $dbh->prepare("SELECT count(*) from DVDsamling");
$sth->execute();
$sth->bind_result($count);
$sth->fetch();
$sth->reset();
$sth = $dbh->prepare("SELECT Filmtitel FROM DVDsamling order by VideosamlingsID desc LIMIT 5");
$sth->execute();
$sth->bind_result($filmtitel);
echo "De 5 nyeste indkøbte DVD'er:\n";
while ($sth->fetch()) {
printf("- %s\n", $filmtitel);
}
echo "
\n";
echo "Min samling indeholder pt. " . $count . " DVD'er.
";
echo "\n";
echo "\n";
echo " Filmtitel | \n";
echo " Genre | \n";
echo " Læde | \n";
echo " Format | \n";
echo " Regionskode | \n";
echo " Udgivelsesår | \n";
echo "
\n";
$sth = $dbh->prepare("SELECT * FROM DVDsamling order by Filmtitel");
$sth->execute();
$sth->bind_result($ID,$Filmtitel,$Genre,$Laengde,$Format,$Udgivelsesaar,$Regionskode,$IMDBlink);
while ($sth->fetch()) {
echo "";
echo "". $Filmtitel . " | ";
echo "" . $Genre . " | ";
echo "" . $Laengde . " | ";
echo "" . $Format . " | ";
echo "" . $Regionskode . " | ";
echo "" . $Udgivelsesaar . " | ";
echo "
\n";
}
echo "
\n";
/* close connection */
$dbh->close();
?>