Folder reorganize 1
This commit is contained in:
21
data/OLD/westTDavg.php
Normal file
21
data/OLD/westTDavg.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include("../items.php");
|
||||
|
||||
|
||||
//West AVG time query
|
||||
|
||||
$con=mysqli_connect('192.168.0.9', 'corey', '41945549', 'controls');
|
||||
$query="SELECT DATE FROM plc GROUP BY totsouth DESC LIMIT 10";
|
||||
$result=mysqli_query($con, $query);
|
||||
|
||||
$westtime = [];
|
||||
|
||||
while ($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) {
|
||||
array_push($westtime, date(strtotime($row['DATE'])));
|
||||
}
|
||||
$westavg=date('i:s', ($westtime[0]-$westtime[9])/10);
|
||||
|
||||
echo $westavg;
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
Reference in New Issue
Block a user