Could not execute leagues count. select count(*) from leagues where season = and federation = and status = 'ik' and category is not null , You have an error in your SQL syntax near 'and federation = and status = 'ik' and categ' at line 4