SELECT SQL_CALC_FOUND_ROWS p.id, p.subject, p.body, p.date_posted, p.date_updated,
u.name as author, u.id as author_id, u.signature as sig,
c.count as postcount,
p.forum_id as forum_id,
f.forum_moderator as mod,
p.update_id,
u2.name as updated_by
FROM forum_forum f
JOIN forum_posts p ON f.id = p.forum_id
JOIN forum_users u ON u.id = p.author_id
LEFT JOIN forum_users u2 ON u2.id = p.update_id
LEFT JOIN forum_postcount c ON u.id = c.user_id
WHERE (p.topic_id = 2#post5 OR p.id = 2#post5)
ORDER BY p.topic_id, p.date_posted
LIMIT 0,10
which line is the error in now?
are you sure 2#post5 is a vliad value for the columns?
if it's a numeric column the #post5 may not be there
if it's not a numeric column the 2#post5 hast be enclosed by '