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 MariaDB 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/5/d/darwindatacom/www/
Class: DatabaseMySQL
Method: query
Line: 69
Backtrace: #0 /home/5/d/darwindatacom/www/ DatabaseMySQL->query('SELECT COUNT(*)...') #1 /home/5/d/darwindatacom/www/ Forum->getThreads() #2 /home/5/d/darwindatacom/www/ ZarphCore->run_module('19', '129', '2') #3 /home/5/d/darwindatacom/www/ ZarphCore->get_active_modules('111') #4 /home/5/d/darwindatacom/www/ ZarphCore->initiate_site() #5 {main}