Jump to content

Code Snippet


smokey68

Recommended Posts

  • Moderators

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
Link to comment
Share on other sites

  • 1 year later...

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...