This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ ==== Graph === / | |
echo '<div class="wrap">'; | |
$sqlaqi = "SELECT * FROM aqitable ORDER BY timestamp desc LIMIT 24"; | |
$result = $conn->query($sqlaqi); | |
if ($result->num_rows > 0) { | |
// output data of each row | |
while($row = $result->fetch_assoc()) { | |
$aqivalue = $row["aqi"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$servername = "xx.xxx.xxx.xxx"; | |
$username = "xxxxxxxxxxxx"; | |
$password = "xxxxxxxxxxxx"; | |
$dbname = "xxxxxxxxxxxxxx"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($medaritno2 < 0.106) { | |
$kmaxno2 = 1; | |
} | |
if ($medaritno2 >= 0.107 AND $kmax <= 0.121) { | |
$kmaxno2 = 2; | |
} | |
if ($medaritno2 >= 0.213 AND $kmax <= 0.319) { | |
$kmaxno2 = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$servername = "82.xx.xx.xxx"; | |
$username = "xxxxxxxxxx"; | |
$password = "xxxxxxxxxx"; | |
$dbname = "MeshliumDB"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); |