SQL-DATABASE ERROR

Database error in WoltLab Burning Board (2.3.6): Invalid SQL: Select * from dev_rating where userId= and threadId IN( Select threadId from dev_rating where userId = 0)
mysql error: 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 threadId IN( Select threadId from dev_rating where userId = 0)' at line 1
mysql error number: 1064
mysql version: 5.1.73-nmm1-log
php version: 5.3.18-nmm1
Date: 16.04.2014 @ 06:31
Script: /thread.php?threadid=4136
Referer: