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 1:getValue: SELECT sum(gold) from ds_result_sukma where event_id=17 and display=1 and title='Negeri Sembilan' and sports_id in ()