diff --git a/tools/wsndata.php b/tools/wsndata.php index 44e093b5..032d2f56 100644 --- a/tools/wsndata.php +++ b/tools/wsndata.php @@ -107,7 +107,7 @@ ini_set('error_log','/tmp/wsn.log'); if($variable==-1) { //获取数据 - $sql2= "SELECT v.fld_time as time,v.fld_value as value,va.fld_name as variablename FROM tbl_value v left join tbl_variable_info va on v.fld_variable_id=va.fld_variable_id WHERE v.fld_site_id=$site AND v.fld_time>='$start' AND v.fld_time<'$endtime' ORDER BY time "; + $sql2= "SELECT v.fld_time as time,v.fld_value as value,va.fld_name as variablename FROM tbl_value v left join tbl_variable_info va on v.fld_variable_id=va.fld_variable_id WHERE v.fld_site_id=$site AND v.fld_time>='$start' AND v.fld_time<'$end' ORDER BY time "; $sth2 = $db->query($sql2); $rows2 = $sth2->fetchAll(); $endtime=date("Y-m-d",strtotime($start)+24*3600);