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 'and b.id not in (4582,38,53,19,39,54,18,40,55,17,41,56,26,42,57,27,43,58,28,44) ' at line 1