I know questions about this have been asked before, but I have not seen any discussion regarding my particular problem. I found the tutorial on wiki.phpbb.com/Practical.Displaying_posts_and_topics_on_external_pages and everything is fine while I am logged in to my forum. However when I am not logged in (as visitors to my site will be when visiting for the first time), I get an SQL error. The malformed statement is as follows:
- Code: Select all
SELECT p.*, t.* FROM (phpbb_posts p) LEFT JOIN phpbb_topics t ON (t.topic_first_post_id = p.post_id) WHERE OR t.forum_id = 5 AND t.topic_status <> 2 AND t.topic_approved = 1 ORDER BY p.post_id DESC LIMIT 5
Looks like something is missing after 'WHERE'.