connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
?>
|
|
|
|
|
CIELO e STELLE d’APPENNINO’ Dati presenti sul DB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cron |
|
Magnitudo |
|
Freq |
|
Cnt |
|
T int |
|
Lat |
|
Lon |
|
Date |
|
Time |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
“;
echo $submenu_cells;
// Query per recuperare tutti i record
$sql = “SELECT * FROM sky_quality $order_by”;
$result = $conn->query($sql);
/*
//
$Select_sky_quality = new PDO(“mysql:host=$db_host; dbname=$db_name”, $db_user, $db_pass);
// —- select al db
//$sql = “SELECT * FROM sky_quality $order_by”;
$sql = “SELECT * FROM sky_quality WHERE id=1”;
// Check if there are results
if ($Select_data_sky_quality = mysqli_query($con, $sql))
{
while($dati_sky_quality = mysqli_fetch_array($Select_data_sky_quality))
{
*/
// Loop attraverso i risultati della query e stampa ogni record in una riga della tabella
if ($result->num_rows > 0)
{
while($dati_sky_quality = $result->fetch_assoc())
{
$cron = $dati_sky_quality[‘cron’];
$magnitudo = $dati_sky_quality[‘magnitudo’];
$frequency = $dati_sky_quality[‘frequency’];
$counter = $dati_sky_quality[‘counter’];
$t_int = $dati_sky_quality[‘t_int’];
$lat = $dati_sky_quality[‘lat’];
$lon= $dati_sky_quality[‘lon’];
$date = $dati_sky_quality[‘date’];
$time = $dati_sky_quality[‘time’];
$info = $dati_sky_quality[‘info’];
echo ‘
|
|
‘;
echo $cron;
echo ‘ |
|
‘;
echo $magnitudo;
echo ‘ |
|
‘;
echo $frequency;
echo ‘ |
|
‘;
echo $counter;
echo ‘ |
|
‘;
echo $t_int;
echo ‘ |
|
‘;
echo $lat;
echo ‘ |
|
‘;
echo $lon;
echo ‘ |
|
‘;
echo $date;
echo ‘ |
|
‘;
echo $time;
echo ‘ |
|
‘;
echo ‘
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
‘;
}
}
// Chiudi la connessione al database
$conn->close();
?>