Folder reorganize 1
This commit is contained in:
33
data/OLD/w24hravgtotal.php
Normal file
33
data/OLD/w24hravgtotal.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
error_reporting(E_ERROR);
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
|
||||
mysql_connect('127.0.0.1',$username,$password);
|
||||
@mysql_select_db($database) or die( "Unable to select database");
|
||||
$query = "SELECT (SELECT AVG(wtonshr) FROM milling ORDER BY id DESC LIMIT 600) AS rate, (SELECT avgtcd FROM milling ORDER BY id DESC LIMIT 1) AS eavg";
|
||||
$result=mysql_query($query);
|
||||
|
||||
$num=mysql_numrows($result);
|
||||
|
||||
mysql_close();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$i=0;
|
||||
while ($i < $num) {
|
||||
|
||||
$f1=mysql_result($result,$i,"rate");
|
||||
$f2=mysql_result($result,$i,"eavg");
|
||||
?>
|
||||
|
||||
|
||||
<?php echo round($f1,0)*24+$f2; ?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user