Page 1 of 1

Latest Post Staff Forums

Posted: Sat Feb 19, 2005 2:50 am
by dwfait
We have an invision boar don our site, and from our main site were calling this query to get the latest posts:

Code: Select all

SELECT last_poster_name, last_poster_id, title, tid, forum_id, last_post FROM ibf_topics ORDER BY last_post DESC LIMIT 0,3
However, is there a way to choose to not include them if they have a forum_id value of 5 or 15? as these are staff forums.

Posted: Sat Feb 19, 2005 3:39 am
by n00b Saibot
simply add this

Code: Select all

WHERE forum_id != 5 AND forum_id != 15
before ORDER BY clause ;)

Posted: Sat Feb 19, 2005 7:49 am
by feyd
I'd suggest using an authorization check against the user instead. So staff see the forum posts they have access to, and regular users see only the posts they have access to.