Jump to content
vbegin72

Code Snippet

Recommended Posts

You would need a function to count ACARS data in ACARS data table like this:


public static function countactiveflights()
{
$sql="SELECT * FROM phpvms_acarsdata WHERE lastupdate = date(now())";
$count = DB::get_results($sql);
return count($count);
}

Now place this in "OperationsData.class.php" at the bottom before the closing bracket. Then you would call the function like this:


<table>
<tr>
<td>Active Flights:</td>
<td><?php echo OperationsData::countactiveflights(); ?> Active flights </td>
</tr>
</table>

Edited by parkho

Share this post


Link to post
Share on other sites
On 7/11/2018 at 3:34 PM, shakamonkey88 said:

<?php echo ACARSData::getLiveFlightCount(); ?>

 

Thanks, shakamonkey88

works great !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×