<?php
session_start();

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

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

$dal = new DAL();
$sql = "SELECT PWO.id, OP.id AS selseloperationname, OP.operationtype_id AS operationtype_id, " .
       "PWO.starttime AS operationstarttime, PWO.op_duration AS op_duration, " .
       "PWO.note AS operationnote " . 
       "FROM projectworkdayoperation PWO, operation OP " .
       "WHERE PWO.id = $pwo_id AND OP.id = PWO.operation_id LIMIT 1 ";
$result = $dal->query($sql);

echo json_encode($result);

?>

