false)))) {
die($err);
}
$db -> exec('SET CHARACTER SET utf8');
$q = $db -> prepare(
'select
distinct v.sensor_id,s.s_description,p.id as param_id,p.st_description
from
sensor_values v,st_parameters p,sensors s
where
v.timestamp>adddate(now(), -1)
and v.sensor_id=s.id
and s.st_id=p.st_id
and p.id>=0
order by s_description,st_description'
);
$q -> execute();
while ($row = $q -> fetch(PDO::FETCH_ASSOC)) {
echo ''.$row['s_description'].'/'.$row['st_description'].'
';
?>
Архивные данные
Настройки