Skip to content

Commit edbec61

Browse files
committed
fix StatisticsController compatibility with MySQL 8.0
1 parent b3fcf9c commit edbec61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AnketaBundle/Controller/StatisticsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ public function analyticsStatsStartedDailyAction($season_slug = null) {
467467
$conn = $em->getConnection();
468468
$season = $this->getSeason($season_slug);
469469

470-
$st = $conn->prepare("select date_format(UserSeason.startTimestamp, '%Y-%m-%d') as dates, count(*) as counts from UserSeason where UserSeason.startTimestamp is not NULL and UserSeason.season_id = :season_id group by date_format(dates, '%Y-%m-%d')");
470+
$st = $conn->prepare("select date_format(UserSeason.startTimestamp, '%Y-%m-%d') as dates, count(*) as counts from UserSeason where UserSeason.startTimestamp is not NULL and UserSeason.season_id = :season_id group by date_format(UserSeason.startTimestamp, '%Y-%m-%d') order by date_format(UserSeason.startTimestamp, '%Y-%m-%d')");
471471
$st->bindValue('season_id', $season->getId());
472472
$st->execute();
473473

@@ -484,7 +484,7 @@ public function analyticsStatsFinishedDailyAction($season_slug = null) {
484484
$conn = $em->getConnection();
485485
$season = $this->getSeason($season_slug);
486486

487-
$st = $conn->prepare("select date_format(UserSeason.finishTimestamp, '%Y-%m-%d') as dates, count(*) as counts from UserSeason where UserSeason.finishTimestamp is not NULL and UserSeason.season_id = :season_id group by date_format(dates, '%Y-%m-%d')");
487+
$st = $conn->prepare("select date_format(UserSeason.finishTimestamp, '%Y-%m-%d') as dates, count(*) as counts from UserSeason where UserSeason.finishTimestamp is not NULL and UserSeason.season_id = :season_id group by date_format(UserSeason.finishTimestamp, '%Y-%m-%d') order by date_format(UserSeason.finishTimestamp, '%Y-%m-%d')");
488488
$st->bindValue('season_id', $season->getId());
489489
$st->execute();
490490

0 commit comments

Comments
 (0)