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 ''Yuzuki N''' at line 1 *** SQL *** SELECT count(*) total FROM manga_series ms left join index_authors ia on ia.series_id = ms.series_id where ms.total_chapters>0 and ms.is_online=1 AND ia.author='Yuzuki N''