Quote:
Originally Posted by ryancooper
Logician,
Would you able able to post the code to use that will return the latest 5 threads about %$WT_PageName%
I was using tags because I couldnt figure out how to search the title of posts  LOL
|
I believe this should work:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.title LIKE '%$WT_PageName%'
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5