<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');

foreach ($_POST as $paramName => $paramValue) {
  if ($paramName == "selid")
    $we_id = $paramValue;
}

$dal = new DAL();
$sql = "SELECT id, cloudcover_id, atmosphere_id, temperature, " .
       "humidity, lighting_id, precipitation_id " .
       "FROM weather WHERE id = $we_id LIMIT 1";
$result = $dal->query($sql);

echo json_encode($result);

?>

