mattsmith Posted July 27, 2015 Report Share Posted July 27, 2015 Is there an easy way to find the following for my airline. Number of Daily Departures Number of Destinations Thanks Quote Link to comment Share on other sites More sharing options...
RuiMiguel Posted July 28, 2015 Report Share Posted July 28, 2015 Hello, http://forum.phpvms.net/topic/4592-airlines-stats/ Quote Link to comment Share on other sites More sharing options...
mattsmith Posted July 29, 2015 Author Report Share Posted July 29, 2015 Thanks but this dosent help with the info i'm looking for Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted July 29, 2015 Moderators Report Share Posted July 29, 2015 Number of Daily Departures: <?php echo StatsData::totalflightstoday(); ?> For the number of destinations i do not think that there is already a counter but you can use this. Just open your StasData.class.php file and place this: public static function total_destinations() { $key = 'total_destinations'; $total = CodonCache::read($key); if($total === false) { $sql = "SELECT COUNT(DISTINCT arricao) AS total FROM ".TABLE_PREFIX."schedules WHERE enabled=1"; $result = DB::get_row($sql); if(!$result) { return 0; } $total = $result->total; CodonCache::write($key, $total, '15minute'); } return $total; } after that, you can use this part of code to show the number of destinations: <?php echo StatsData::total_destinations(); ?> 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.