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,34,49,35,50,36,51,37,52,38,53,19,39,54,18,40,55,17,41,56) ' at line 1