From e53f819264b2d6902996f11ffcbb7c99295a90ef Mon Sep 17 00:00:00 2001 From: Benjamin Bellamy Date: Thu, 8 Oct 2020 18:21:51 +0200 Subject: [PATCH] fix: correct percona compatibility issue --- app/Models/AnalyticsPodcastModel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/AnalyticsPodcastModel.php b/app/Models/AnalyticsPodcastModel.php index 82e57113..680ca78d 100644 --- a/app/Models/AnalyticsPodcastModel.php +++ b/app/Models/AnalyticsPodcastModel.php @@ -64,8 +64,8 @@ class AnalyticsPodcastModel extends Model '`podcast_id`' => $podcastId, '`date` >' => date('Y-m-d', strtotime('-1 year')), ]) - ->orderBy('`date`', 'ASC') - ->groupBy('concat(month(`date`),"-",year(`date`))') + ->groupBy('`labels`') + ->orderBy('`labels`', 'ASC') ->findAll(); cache()->save( @@ -131,8 +131,8 @@ class AnalyticsPodcastModel extends Model ->where([ '`podcast_id`' => $podcastId, ]) - ->groupBy('concat(month(`date`),"-",year(`date`))') - ->orderBy('`date`', 'ASC') + ->groupBy('`labels`') + ->orderBy('`labels`', 'ASC') ->findAll(); cache()->save(