Fix common movie list request

This commit is contained in:
2026-07-12 15:36:08 +02:00
parent 92e8bf9cdc
commit 77328f2908
+2 -2
View File
@@ -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];