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];