1064 - 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.b_id != '40' GROUP BY messe_text ORDER BY anzahl DESC LIMIT ' at line 6

SELECT b.b_id, b.messe_text, count( messe_text ) AS anzahl FROM branchen AS b LEFT JOIN btom AS m ON m.b_id = b.b_id WHERE b.sprach_id ='2' AND m.messe_id IN ( ) and b.b_id != '40' GROUP BY messe_text ORDER BY anzahl DESC LIMIT 20

[TEP STOP]