![]() |
Question about query syntax
I'm trying to pull the last 3 posts from a few forums and then sort the by the forum's name. Here is what I have so far:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid FROM thread t LEFT JOIN post p ON p.postid = t.firstpostid LEFT JOIN forum f ON f.forumid = t.forumid WHERE t.forumid IN ( 19, 116 ) AND t.open = '1' AND t.visible = '1' ORDER BY forumtitle DESC LIMIT 0 , 3 The code above only pull 3 total posts from the forums, any ideas on how to pull the last 3 posts from each forum? Thanks in advance! |
Assuming you'd put this code bit in forumdisplay.php file.
PHP Code:
Quote:
|
Quote:
I'm not putting it into the forumdisplay.php file, I'm putting it into the query box with Logician's hack: WebTemplates 3.x: VB Integrated Content Management System Link to my question (and some ideas I have tried) in that thread. https://vborg.vbsupport.ru/showthrea...267#post641267 I've also tried using the ORDER BY query option but no luck. Thanks for the try anyway. :) Any other ideas? |
All times are GMT. The time now is 01:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|