<?php

require_once("../config/configDB.php"); 

$vehicleID    = $_GET['vehicleID'];


$resultClosingKM = mysqli_query($conn,"SELECT  sum(engineclosing_hr) as engineclosing_hr  FROM trip_transportation_hdr as tth WHERE tth.vehicleno='".$vehicleID."' and  tth.isdelete=1 GROUP BY  tth.vehicleno");

$elosing_hr    = mysqli_fetch_array($resultClosingKM,MYSQLI_ASSOC);

$elosing_hr   = ($elosing_hr['engineclosing_hr']>0) ? $elosing_hr['engineclosing_hr'] : 0;

$res = array();		

array_push($res, array("elosing_hr"=>$elosing_hr));

echo json_encode($res);

?>