fix: correct percona compatibility issue

This commit is contained in:
Benjamin Bellamy 2020-10-08 18:21:51 +02:00 committed by Yassine Doghri
parent 3a4925816f
commit e53f819264
1 changed files with 4 additions and 4 deletions

View File

@ -64,8 +64,8 @@ class AnalyticsPodcastModel extends Model
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 year')), '`date` >' => date('Y-m-d', strtotime('-1 year')),
]) ])
->orderBy('`date`', 'ASC') ->groupBy('`labels`')
->groupBy('concat(month(`date`),"-",year(`date`))') ->orderBy('`labels`', 'ASC')
->findAll(); ->findAll();
cache()->save( cache()->save(
@ -131,8 +131,8 @@ class AnalyticsPodcastModel extends Model
->where([ ->where([
'`podcast_id`' => $podcastId, '`podcast_id`' => $podcastId,
]) ])
->groupBy('concat(month(`date`),"-",year(`date`))') ->groupBy('`labels`')
->orderBy('`date`', 'ASC') ->orderBy('`labels`', 'ASC')
->findAll(); ->findAll();
cache()->save( cache()->save(