Error 404

A Database Error Occurred

Error Number: 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 (users.type='Registered' OR users.type='Admin' OR users.type='Moderator' OR ' at line 1

SELECT SQL_CALC_FOUND_ROWS num_of_comments.num_of_comments as commentsCount , topics.*,topics.type as topictype,topics.thumbnail as thumbnail, date_format(topics.created_date,'%M %e, %Y, %h:%i %p') as created_date_friendly,UNIX_TIMESTAMP(topics.created_date) as unixtopicsdate,users.thumbnail as userthumb, users.type as usertype FROM topics LEFT JOIN users ON users.id=topics.user_id LEFT JOIN num_of_comments on topics.id=num_of_comments.item_id WHERE topics.status<>'deleted' AND topics.status<>'pending' AND topics.category_id= AND (users.type='Registered' OR users.type='Admin' OR users.type='Moderator' OR topics.status='featured' OR topics.status='featuredhp') AND topics.created_date<=now() ORDER BY updated_date DESC LIMIT 0,8