Airline Statistik

Hi pilot,

how do I get rounded values ​​in the statistics or even appear without a comma?

Thanks for your help …

http://v-hp.ath.cx//vms/index.php/acars

Joe

Around the variable you want to round, use:

round($var, 2);

to round to 2 d.p.

or just:

round($var);

to round to the nearest whole number

How do I build it here as a

public static function TotalFuelBurned($airline_code = ‘’) {

return self::getTotalForCol(array(

‘table’ => ‘pireps’,

‘column’ => ‘fuelused’,

‘airline_code’ => $airline_code,

‘where’ => array(‘accepted’ => PIREP_ACCEPTED),

‘func’ => ‘SUM’,

)

);

Thank you for the first time for the help

Joe

Do it to the value from that function, so:

$total = StatsData::TotalFuelBurned();
$total = round($total, 0); # no decimals

Sorry I ask again, I do not know how I do I just get errors insert. I understand it not also be inserted in that file must

Thanks, Joe

Ok problem solved itself, but thank you

public static function Landingmit($airline_code = '') {
	return round(self::getTotalForCol(array(
		'table' => 'pireps',
		'column' => 'landingrate',
		'airline_code' => $airline_code,
		'where' => array('accepted' => PIREP_ACCEPTED),
		'func' => 'avg',
	)),0);    
   }

Joe