diff --git a/server/dewey.php b/server/dewey.php new file mode 100644 index 0000000..40d046a --- /dev/null +++ b/server/dewey.php @@ -0,0 +1,246 @@ + + + +
prepare("SELECT COUNT(*) as n FROM Libri"); + $stmt->execute(); + $data = $stmt->fetch(); + + $vols = $data["n"]; + + $stmt = $pdo->prepare("SELECT COUNT(*) as n FROM Libri WHERE length(Dewey)>0"); + $stmt->execute(); + $data = $stmt->fetch(); + $dewey = $data["n"]; + echo "Volumi: " . $vols.", di cui ".$dewey." (".round($dewey/$vols*100)."%) collocati nella calssificazione dewey"; + + $vols = $data["n"]; + ?>
+ + +prepare("SELECT COUNT(DISTINCT Autore) as n FROM Libri"); + $stmt->execute(); + $data = $stmt->fetch(); + + echo "Autori: " . $data["n"]; + + ?>
+ + ++ +
'.$d1.'00 - '.trim(htmlentities($dMap[$d1][0][0]))."
"; + $toc.="\n".''.$d1.$d2.'0 - '.trim(htmlentities($dMap[$d1][$d2][0]))."
"; + if($d2!=0) $toc.="\n".''.$d1.$d2.$d3.' - '.trim(htmlentities($dMap[$d1][$d2][$d3]))."
"; + $toc.="\n".'