mattsmith Posted July 27, 2015 Report 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
RuiMiguel Posted July 28, 2015 Report Posted July 28, 2015 Hello, http://forum.phpvms.net/topic/4592-airlines-stats/ Quote
mattsmith Posted July 29, 2015 Author Report Posted July 29, 2015 Thanks but this dosent help with the info i'm looking for Quote
Moderators servetas Posted July 29, 2015 Moderators Report 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
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.