Database error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY al.ranking DESC, al.year LIMIT 10) as A ORDER BY RAND() LIMIT 1) AS b' at line 4 SELECT * FROM (SELECT * FROM (SELECT a.img_profile, al.img_cover, al.name as album_name, al.year as album_year, al.slug as album_slug, a.slug as artist_slug, a.name as artist_name FROM albums as al INNER JOIN artists as a on a.id = al.artist_id WHERE a.id = ORDER BY al.ranking DESC, al.year LIMIT 10) as A ORDER BY RAND() LIMIT 1) AS b []