functions.php:2070 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 '))' at line 3

SELECT MainPages.MainPageID AS MainPageID , seo_data.seo_url AS link , MainPages.MainPageTitle AS MainPageTitle FROM `seo_data` JOIN `MainPages` USING(seoID) WHERE (MainPages.MainPageID IN())