<?php

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

if (isset($_REQUEST["arg"])) {
  $arg1 = $_REQUEST["arg"];

  
$dal = new DAL();

$sql = "SELECT PP.id, PT.travel_id, surname " . 
       "FROM projectworkdaypersonnel PP, personnel PR, " .
       "personneltravel PT, travel TR " .
       "WHERE PP.projectworkday_id = 72 AND TR.id = 40 " .
       "AND PR.id = PP.personnel_id AND PP.id = PT.projectworkdaypersonnel_id " .
       "AND TR.id = PT.travel_id AND TR.destination = 'to' AND PT.travelrole_id = 9 "; 
$result = $dal->query($sql);

echo json_encode($result);

?>

