Hi,
I’m trying to create a Fuel Rate indicator for my VA, but I’m not an expert on PHP, can someone help?
I already have each pirep report showing what I called the Fuel Rate (the idea is to have a value that demonstrates, for each flight, the percentage of fuel spent in relation to what was initially foreseen by the VA for that given flight).
I did it this way:
<?php $fuelrate = substr(($pirep->routefuel - $pirep->fuelused) * 100 / $pirep->routefuel, 0, 4); echo $fuelrate?> %
(routefuel is a new column I created in the ‘schedules’ DB).
This is running fine, showing in each pirep report.
What I want is to have the average of this Fuel Rate per each pilot, considering all his flights.
And I’d like to show it at the pilot’s public profile.
Can somebody help?
Thanks.
Joao