Fix bad sql request

This commit is contained in:
2026-07-11 20:29:14 +02:00
parent 72d563416b
commit 92e8bf9cdc
+2 -3
View File
@@ -57,11 +57,10 @@ class Movie {
// 3. Commune
$stmt = $this->db->prepare("
SELECT *
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
GROUP BY tmdb_id
ORDER BY added_at DESC
GROUP BY tmdb_id, title, poster_path, media_type, is_common
");
$stmt->execute();
$common = $stmt->fetchAll(PDO::FETCH_ASSOC);