smokey68 Posted November 29, 2016 Report Share Posted November 29, 2016 What is the php code for showing how many active flight there are in number format EX : 3 Active Flights Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 29, 2016 Moderators Report Share Posted November 29, 2016 (edited) 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 November 29, 2016 by parkho Quote Link to comment Share on other sites More sharing options...
smokey68 Posted July 11, 2018 Author Report Share Posted July 11, 2018 not working anymore when switched to 5.5 Quote Link to comment Share on other sites More sharing options...
Moderators shakamonkey88 Posted July 11, 2018 Moderators Report Share Posted July 11, 2018 <?php echo ACARSData::getLiveFlightCount(); ?> Quote Link to comment Share on other sites More sharing options...
smokey68 Posted July 13, 2018 Author Report Share Posted July 13, 2018 On 7/11/2018 at 3:34 PM, shakamonkey88 said: <?php echo ACARSData::getLiveFlightCount(); ?> Thanks, shakamonkey88 works great ! 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.