Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Przemek
|
||||
* Date: 2015-10-15
|
||||
* Time: 11:13
|
||||
*/
|
||||
|
||||
date_default_timezone_set('Europe/Warsaw');
|
||||
require_once("func.php");
|
||||
require_once("dbaccess.php");
|
||||
$polacz = mysql_connect($db_host, $db_user, $db_user_pass) or die ('cannot connect to db');
|
||||
mysql_select_db($db_name);
|
||||
mysql_query("SET NAMES utf8");
|
||||
mysql_query("SET CHARACTER_SET utf8_general_ci");
|
||||
|
||||
echo"Start: ".date('H:i:s:u')."<br/>";
|
||||
|
||||
$result = mysql_query("select * from rep_his_data_everyday where RHD_DATE>(select DATE_SUB(sysdate(), INTERVAL 90 DAY)) and RHD_DRS_ID=3143");
|
||||
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
|
||||
$res[] = array(
|
||||
'id'=> $row[0],
|
||||
'dev_id'=> $row[1],
|
||||
'date'=>$row[2],
|
||||
'hst'=>$row[3],
|
||||
'hd'=>$row[4],
|
||||
'q'=>$row[5],
|
||||
'p1'=>$row[6],
|
||||
'p2'=>$row[7],
|
||||
'i'=>$row[8],
|
||||
'u'=>$row[9],
|
||||
'pe'=>$row[10],
|
||||
'cos'=>$row[11],
|
||||
'pp'=>$row[12],
|
||||
'hh'=>$row[13],
|
||||
'dgn'=>$row[14],
|
||||
'work_time'=>$row[15],
|
||||
'audit_date'=>$row[16]
|
||||
);
|
||||
}
|
||||
mysql_free_result($result);
|
||||
echo"Stop: ".date('H:i:s:u')."<br/>";
|
||||
|
||||
print_r($res);
|
||||
|
||||
mysql_close($polacz);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user