Fix bad sql request
This commit is contained in:
+2
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user