I experienced a similar problem. Open admin/misc.php and verify your variables have double quotes enclosed within single quotes, so for instance if the attach sum is empty (attachments turned off) then the correct syntax will still be outputted.
PHP Code:
$DB_site->query("UPDATE thread SET lastpost='".$lastpost."',replycount='".$numberposts."',
postusername='".addslashes($firstusername)."', postuserid='".$firstuserid."',
lastposter='".addslashes($lastusername)."',attach='".$attachsum."' WHERE threadid='".$threadid."'");