Jump to content

Total Hours by airlines


boeing974

Recommended Posts

  • Moderators

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);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...