Invalid query: 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 '' at line 2 Whole query: select post_text, username, topic_title, concat("http://taiyedbrodels.com/forum/viewtopic.php?t=",phpbb2_posts.topic_id) as link from phpbb2_posts_text join phpbb2_posts on phpbb2_posts.post_id = phpbb2_posts_text.post_id join phpbb2_users on phpbb2_users.user_id = phpbb2_posts.poster_id join phpbb2_topics on phpbb2_topics.topic_id = phpbb2_posts.topic_id where phpbb2_posts.post_id =