Zarph Exception

Message: An exception occoured while trying to perform an SQL query.
Database Report: 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 post_id <>' at line 7
SQL: SELECT COUNT(*) FROM sp_forum_posts WHERE thread_id = AND post_id <>
File: /home/web0504/public_html/style-productions.net/core/DatabaseMySQL.class.php
Class: DatabaseMySQL
Method: query
Line: 69
Backtrace: #0 /home/web0504/public_html/style-productions.net/core/Forum.class.php(202): DatabaseMySQL->query('SELECT COUNT(*)...') #1 /home/web0504/public_html/style-productions.net/core/ZarphCore.class.php(245): Forum->getThreads() #2 /home/web0504/public_html/style-productions.net/core/ZarphCore.class.php(165): ZarphCore->run_module('19', '129', '2') #3 /home/web0504/public_html/style-productions.net/core/ZarphCore.class.php(145): ZarphCore->get_active_modules('111') #4 /home/web0504/public_html/style-productions.net/index.php(57): ZarphCore->initiate_site() #5 {main}