它引用的行mysql_fetch_array()
是调用函数的行。运行时查询工作正常phpmyadmin
。它也不会引发任何错误。任何帮助,将不胜感激。
$query = "select distinct s.time, s.parameter, s.data, t.units from alertData as s, parameters as t where s.parameter like '%Airtemp_Avg%' and s.staID = 'WS_001_UHC' and s.interval_min = 15 and t.parameter like '%Airtemp_Avg%' and unix_timestamp(s.time) >= (unix_timestamp(now()) - 86400) order by time desc";
$results = mysql_query($query) || die(mysql_error());
$dataCnt = 0;
while($info = mysql_fetch_array($results)) {
//15 Min data
if(($dataCnt == 0) && (getTimestamp($info['time']) >= ($now - 4500)))
$data15['temp'] = $info['data'];
else
$data15['temp'] = '-';
$dataCnt++;
}