$query="SELECT MINUTE (ETA - STA)
FROM `FlightSchedule` WHERE `flightNum_arr`='".$flightNum_arr."';";
$delay=ejecutar_query($query);
$query = "UPDATE `FlightSchedule`
SET `delay`='".$delay."'
WHERE `flightNum_arr`='".$flightNum_arr."';";
$result=ejecutar_query($query);
Instead of saving the minutes values, it saves Resource id#. How to fix this issue?
You have to fetch data using
Modify your update query.
Also modify select query little bit.