From 77328f29084db680a5b8802987c4b0d44e88c56d Mon Sep 17 00:00:00 2001 From: Whykioh Date: Sun, 12 Jul 2026 15:36:08 +0200 Subject: [PATCH] Fix common movie list request --- models/Movie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/Movie.php b/models/Movie.php index edad9b8..4125cf4 100644 --- a/models/Movie.php +++ b/models/Movie.php @@ -59,10 +59,10 @@ class Movie { $stmt = $this->db->prepare(" SELECT MAX(id) as id, tmdb_id, title, poster_path, media_type, is_common, MAX(added_at) as added_at FROM movies - WHERE is_common = 1 + WHERE is_common = 1 AND (user_id = ? OR user_id = ?) GROUP BY tmdb_id, title, poster_path, media_type, is_common "); - $stmt->execute(); + $stmt->execute([$myId, $partnerId]); $common = $stmt->fetchAll(PDO::FETCH_ASSOC); return ["perso" => $perso, "partner" => $partner, "common" => $common];