<?php

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

$vehicleID    = $_GET['vehicleID'];

$resultClosingKM = mysqli_query($conn,"SELECT closing_km  FROM trip_transportation_hdr as tth WHERE tth.vehicleno='".$vehicleID."' and  tth.isdelete=1 ORDER BY  tth.id DESC  LIMIT 1 ");


$ClosingKM    = mysqli_fetch_array($resultClosingKM,MYSQLI_ASSOC);

$ClosingKM   = ($ClosingKM['closing_km']>0) ? $ClosingKM['closing_km'] : 0;

$res = array();		

array_push($res, array("closingKM"=>$ClosingKM));

echo json_encode($res);

?>