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

foreach ($_POST as $paramName => $paramValue) {
  if ($paramName == "selectid")
    $lo_id = $paramValue;
}

$dal = new DAL();

$sql = "SELECT id, 0 AS fkid, " .
       "name,      '' AS name_text, " .
       "projectparcel_id AS projectparcel_fk, '' AS projectparcel_fk_text " .
       "FROM lot " .
       "WHERE id = $lo_id LIMIT 1 ";
$result = $dal->query($sql);

$_SESSION['lotdefinition'] = $lo_id;

echo json_encode($result);

?>
