boeing974 Posted October 19, 2015 Report Share Posted October 19, 2015 Hi guys, I have a problem with my stats airlines. The Total hours by airline is not correct. I've total hours of all airlines. For view: www.staralliance-va.com/about/members Thank you. PS: I'm the webmaster and i'm french. Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 20, 2015 Moderators Report Share Posted October 20, 2015 You'll need to fetch each airline's data separately and show it to its own page. What I understand is that you have total hours for all airlines in each airline page. For that, you need a function to sum the hours based on airline code: public static function airline_hours($code) { $sql="SELECT SUM(flighttime) FROM phpvms_pireps WHERE code = '$code'"; return DB::get_row($sql); } Now to show this for each airline you need to give it the airline code variable (ex. AIC) like this: Your Common File::airline_hours(AIC); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.