diff --git a/src/Domain/Movie/MovieRepository.php b/src/Domain/Movie/MovieRepository.php index ac87d5e2..880a9863 100644 --- a/src/Domain/Movie/MovieRepository.php +++ b/src/Domain/Movie/MovieRepository.php @@ -909,7 +909,7 @@ public function fetchFromWatchlistWithActor(int $personId, int $userId) : array JOIN person p ON mc.person_id = p.id JOIN watchlist wl ON m.id = wl.movie_id LEFT JOIN movie_user_rating mur ON wl.movie_id = mur.movie_id and mur.user_id = ? - WHERE p.id = ? AND m.id IN (SELECT DISTINCT movie_id FROM watchlist) AND wl.user_id = ? + WHERE p.id = ? AND m.id IN (wl.movie_id) AND wl.user_id = ? ORDER BY LOWER(m.title) SQL, [$userId, $personId, $userId], @@ -927,7 +927,7 @@ public function fetchFromWatchlistWithDirector(int $personId, int $userId) : arr JOIN person p ON mc.person_id = p.id JOIN watchlist wl ON m.id = wl.movie_id and wl.user_id = ? LEFT JOIN movie_user_rating mur ON wl.movie_id = mur.movie_id and mur.user_id = ? - WHERE p.id = ? AND m.id IN (SELECT DISTINCT movie_id FROM watchlist) + WHERE p.id = ? AND m.id IN (wl.movie_id) ORDER BY LOWER(m.title) SQL, [$userId, $userId, $personId],