Ongeldige query: 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 ') AS `a` LEFT JOIN `jv_artist_views` AS `av` ON `av`.`ArtistID` = `a`.`ArtistID' at line 1 Q: SELECT *, `a`.`ArtistID` AS `ArtistID` FROM ( SELECT `a` . * FROM `jv_artists` AS `a` INNER JOIN `jv_artist_filter` AS `af` ON `af`.`ArtistID` = `a`.`ArtistID` INNER JOIN `jv_filters` AS `fi` ON `fi`.`FilterID` = `af`.`FilterID` AND `fi`.`FilterEnabled` = 1 INNER JOIN `jv_filter_groups` AS `fg` ON `fg`.`FilterGroupID` = `fi`.`FilterGroupID` AND `fg`.`FilterGroupID` = ) AS `a` LEFT JOIN `jv_artist_views` AS `av` ON `av`.`ArtistID` = `a`.`ArtistID` INNER JOIN `jv_portal_artist` AS `pa` ON `pa`.`ArtistID` = `a`.`ArtistID` AND `pa`.`PortalID` = 1 AND `ArtistExclusive` = 1 GROUP BY `a`.`ArtistID` ORDER BY `Views` DESC, `ArtistName` ASC LIMIT 0, 48