Skip to content
Snippets Groups Projects
Commit 35f633b4 authored by Benjamin Bellamy's avatar Benjamin Bellamy :speech_balloon: Committed by Yassine Doghri
Browse files

fix: re-order graph values

parent e53f8192
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ class AnalyticsPodcastByCountryModel extends Model ...@@ -40,7 +40,7 @@ class AnalyticsPodcastByCountryModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`labels`', 'ASC') ->orderBy('`values`', 'DESC')
->findAll(); ->findAll();
cache()->save( cache()->save(
......
...@@ -44,7 +44,7 @@ class AnalyticsPodcastByRegionModel extends Model ...@@ -44,7 +44,7 @@ class AnalyticsPodcastByRegionModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`country_code`, `region_code`', 'ASC') ->orderBy('`values`', 'DESC')
->findAll(); ->findAll();
cache()->save( cache()->save(
......
...@@ -40,7 +40,7 @@ class AnalyticsWebsiteByBrowserModel extends Model ...@@ -40,7 +40,7 @@ class AnalyticsWebsiteByBrowserModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`browser`', 'ASC') ->orderBy('`values`', 'DESC')
->findAll(); ->findAll();
cache()->save( cache()->save(
......
...@@ -40,7 +40,8 @@ class AnalyticsWebsiteByEntryPageModel extends Model ...@@ -40,7 +40,8 @@ class AnalyticsWebsiteByEntryPageModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`entry_page`', 'ASC') ->orderBy('`values`', 'DESC')
->limit(10)
->findAll(); ->findAll();
cache()->save( cache()->save(
......
...@@ -40,7 +40,8 @@ class AnalyticsWebsiteByRefererModel extends Model ...@@ -40,7 +40,8 @@ class AnalyticsWebsiteByRefererModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`referer`', 'ASC') ->orderBy('`values`', 'DESC')
->limit(10)
->findAll(); ->findAll();
cache()->save( cache()->save(
...@@ -69,7 +70,8 @@ class AnalyticsWebsiteByRefererModel extends Model ...@@ -69,7 +70,8 @@ class AnalyticsWebsiteByRefererModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')), '`date` >' => date('Y-m-d', strtotime('-1 week')),
]) ])
->orderBy('`domain`', 'ASC') ->orderBy('`values`', 'DESC')
->limit(10)
->findAll(); ->findAll();
cache()->save( cache()->save(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment