$reviewsthread = $vbulletin->db->query_first("
SELECT
thread.threadid, thread.title,
post.pagetext AS preview
FROM
".TABLE_PREFIX."thread AS thread INNER JOIN
".TABLE_PREFIX."post AS post ON thread.firstpostid = post.postid
WHERE
thread.forumid = 12
AND
thread.title LIKE '%".$vbulletin->db->escape_string($moviedata['title'])."%'
LIMIT
1
");
Above is a part of php code to display the post content from a forum thread on external movie page.
Let's say that am viewing AVATAR movie page. It's automatically checking forum (only movie reviews forum which is id(12) ) if there is any thread title contains "avatar" word. If yes, then it is displaying the thread post content in the movie page.
Since i would like to give a link to that thread, i need to know the thread title too.
At this point i need help. How can i get the forum thread id so i can add a link html template such as :
<a href="showthread.php?t=$moviereviewthreadid">Click here to read the entire review...</a>
Thanks in advance... Regards