Skip to content

Commit

Permalink
Fix last cinema plays query issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leepeuker committed Sep 7, 2024
1 parent a6b081c commit 1b53a01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Domain/Movie/MovieRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ public function fetchLastPlaysCinema(int $userId) : array
FROM movie m
JOIN movie_user_watch_dates mh ON mh.movie_id = m.id AND mh.user_id = ? AND mh.watched_at IS NOT NULL
LEFT JOIN movie_user_rating mur ON mh.movie_id = mur.movie_id AND mur.user_id = ?
WHERE location_id IS NOT NULL
JOIN location l on l.id = mh.location_id
WHERE l.is_cinema = 1
ORDER BY watched_at DESC, mh.position DESC
LIMIT 6',
[$userId, $userId],
Expand Down

0 comments on commit 1b53a01

Please sign in to comment.