Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
Merge pull request #63 from phpVMS/master
Browse files Browse the repository at this point in the history
Merge changes from dave
  • Loading branch information
Nabeel Shahzad committed Mar 9, 2012
2 parents bc02380 + cf85e2a commit bc01d47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,3 +14,4 @@ mobile
lib/rss/latestpireps.rss
unittest/reports/**
unittest/web
nbproject/
9 changes: 3 additions & 6 deletions core/common/StatsData.class.php
Expand Up @@ -275,20 +275,17 @@ public static function TopRoutes($airline_code = '') {

$top_routes = CodonCache::read($key);
if ($top_routes === false) {
$sql = 'SELECT *
FROM `' . TABLE_PREFIX . 'schedules`';
$sql = 'SELECT * FROM `' . TABLE_PREFIX . 'schedules`';

if ($airline_code != '') {
$sql .= " WHERE `code`='{$airline_code}' GROUP BY `code`";
$sql .= " WHERE `code`='{$airline_code}'";
}

$sql = ' ORDER BY `timesflown` DESC
LIMIT 10';
$sql = $sql . ' ORDER BY `timesflown` DESC LIMIT 10';

$top_routes = DB::get_results($sql);
CodonCache::write($key, $top_routes, 'medium');
}

return $top_routes;
}

Expand Down

0 comments on commit bc01d47

Please sign in to comment.