Fix common movie list request
This commit is contained in:
+2
-2
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user