32 lines
1.0 KiB
PHP
32 lines
1.0 KiB
PHP
<?php
|
|
session_start();
|
|
include 'db_conf.php';
|
|
|
|
//Query per ottenere le statistiche dei dispositivi
|
|
$sql = "SELECT s.id_stat_device, f.range_eta, s.tipo_dispositivo, s.ore_medie_giornaliere FROM Statistiche_Dispositivi s JOIN Fasce_Eta f ON f.id_fascia=s.id_fascia";
|
|
$resultDispositivi = $conn->query($sql);
|
|
|
|
// Interruzione in caso di errore nella richiesta
|
|
if ($resultDispositivi === false){
|
|
die("Errore nella query: " . $conn->error);
|
|
}
|
|
|
|
//Query per ottenere le statistiche social
|
|
$sql = "SELECT s.id_stat_social, f.range_eta, s.piattaforma, s.minuti_medi_giornalieri, s.percentuale_penetrazione FROM Statistiche_Social s JOIN Fasce_Eta f ON f.id_fascia = s.id_fascia";
|
|
$resultSocial = $conn->query($sql);
|
|
|
|
// Interruzione in caso di errore nella richiesta
|
|
if ($resultSocial === false){
|
|
die("Errore nella query: " . $conn->error);
|
|
}
|
|
?>
|
|
<!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>
|
|
</body>
|
|
</html>
|