24-08-2009, 07:25 PM
Hello FSMicroX
Thanks for the solution. The problem is partially solved. I use the script that indicates the different pilots (Tools and Doc | 417 - Modify
Enanced FsPlistflight whit SUM function for GROUP BY Pilot Name).
Your solution resolv only the part "Virtual Airline Statistics". But the pilots remain at 838:59:59. For those who are using the other script,
this is the right solution.
What needs to be additionaly changed in the script?
Here is the code, that needs to be changed (in bold):
// main sql-query :
$query = "SELECT PilotName, COUNT(PilotName) as TnF, SEC_TO_TIME(SUM(TIME_TO_SEC(TotalBlockTime))) AS TTotalBlockTime, SUM(NbrPassengers) AS TNbrPassengers, SUM(BonusPoints) AS TBonusPoints, SUM(PenalityPoints) AS TPenalityPoints, SUM(BonusPoints - PenalityPoints) AS TotalPoint FROM flights GROUP BY PilotName ORDER BY $sortColumn LIMIT $pStart,$pageLines";
if(!$result=mysql_query($query))
{
echo "SQL Error - ".mysql_error()."<br>".$query;
return;
}
Post Edited ( 08-24-09 20:54 )
Thanks for the solution. The problem is partially solved. I use the script that indicates the different pilots (Tools and Doc | 417 - Modify
Enanced FsPlistflight whit SUM function for GROUP BY Pilot Name).
Your solution resolv only the part "Virtual Airline Statistics". But the pilots remain at 838:59:59. For those who are using the other script,
this is the right solution.
What needs to be additionaly changed in the script?
Here is the code, that needs to be changed (in bold):
// main sql-query :
$query = "SELECT PilotName, COUNT(PilotName) as TnF, SEC_TO_TIME(SUM(TIME_TO_SEC(TotalBlockTime))) AS TTotalBlockTime, SUM(NbrPassengers) AS TNbrPassengers, SUM(BonusPoints) AS TBonusPoints, SUM(PenalityPoints) AS TPenalityPoints, SUM(BonusPoints - PenalityPoints) AS TotalPoint FROM flights GROUP BY PilotName ORDER BY $sortColumn LIMIT $pStart,$pageLines";
if(!$result=mysql_query($query))
{
echo "SQL Error - ".mysql_error()."<br>".$query;
return;
}
Post Edited ( 08-24-09 20:54 )
![[Image: sdc10.jpg]](http://www.fspassengers.com/images/banner/sig/sdc10.jpg)