Quote:
Originally Posted by digitalSite
Ha! This is true! I do only have one post in this forum...I guess my question should be, how do I list threads from ALL forums? Would I have to add every forum here
WHERE t.forum = '1','2','3', etc.? Thanks!
I tried removing this WHERE t.forum = (because I want from ALL forums) and replaced it with WHERE t.open = '1' AND t.visible = '1', but then the titles don't get limited and it posts the entire title.
|
Your WHERE close is right if you want to pull from all forums.
If you want to restrict title, you need to apply the left() to the title section too:
SELECT t.threadid, LEFT(t.title, 10) as title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext, 10) as pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5