Files
controls-web/controls-classic/data/dumpdailyn.php
2026-02-17 09:29:34 -06:00

33 lines
1.0 KiB
PHP

<?php
$username="corey";
$password="41945549";
$database="controls";
mysql_connect('192.168.0.2',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "(SELECT date, 24hrnorth FROM plc WHERE (date LIKE '%04:55:2%' OR date LIKE '%04:55:0%' OR date LIKE '%04:55:4%' OR date LIKE '%04:55:5%' OR date LIKE '%04:56:1%' OR date LIKE '%04:56:3%' OR date LIKE '%04:58:5%' OR date LIKE '%04:58:4%' OR date LIKE '%04:56:2%' OR date LIKE '%04:59:2%' OR date LIKE '%04:59:3%') AND 24hrnorth not LIKE '0' ORDER BY id DESC)";
$result=mysql_query($query);
echo '<table id="table" border="1" style="margin: 5px auto;" width="900px" class="green">';
echo "<thead>";
echo "<tr>";
echo "<th>Timestamp</th>";
echo "<th>Dumps</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
while($row=mysql_fetch_assoc($result))
{
echo '<tr align="center">';
echo "<td>".$row [ 'date' ]."</td>";
echo "<td>".$row [ '24hrnorth' ]."</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
mysql_close();
?>