<?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,        projectparcel_id AS fkid, " .
       "projectparcel_id as projectparcel_fk, '' AS projectparcel_fk_text, " .
       "1 AS completeInd, '' AS completeInd_text, " .
       "lottype_id,       ''AS lottype_id_text, " .
       "rationale,        ''AS rationale_text, " .
       "lotinterpret_id,  ''AS lotinterpret_id_text, " .
       "note,             ''AS note_text " .
       "FROM lot LO WHERE id = $lo_id LIMIT 1 " ; 
$result = $dal->query($sql);

$_SESSION['lotdefinition'] = $lo_id;
 
echo json_encode($result);

?>

