Folder reorganize 1

This commit is contained in:
Rucus
2026-02-17 12:44:37 -06:00
parent ec99d85bc2
commit f0ae0ab905
17427 changed files with 2071 additions and 1059030 deletions

View File

@@ -0,0 +1,35 @@
<?php
header('Content-Type: application/json');
$con = mysqli_connect("192.168.0.14","corey","41945549","controls");
// Check connection
if (mysqli_connect_errno($con))
{
echo "Failed to connect to DataBase: " . mysqli_connect_error();
}else
{
$data_points = array();
$result1 = mysqli_query($con, "SELECT * FROM trending where trending.id mod 5 = 0 GROUP BY DATE DESC LIMIT 100");
$result2 = mysqli_query($con, "SELECT * FROM trending where trending.id mod 5 = 0 GROUP BY DATE DESC LIMIT 100");
while($row = mysqli_fetch_array($result1))
{
$point = array("label" => $row['DATE'] , "y1" => $row['BOILER1SF']);
array_push($data_points, $point);
}
while($row = mysqli_fetch_array($result2))
{
$point = array("label" => $row['DATE'] , "y2" => $row['BOILER2SF']);
array_push($data_points, $point);
}
echo json_encode($data_points, JSON_NUMERIC_CHECK);
}
mysqli_close($con);
?>