![]() |
Getting first post in thread
I have been having trouble getting the first post in a thread depending on the vbulletin implementation
here is the sql im using SELECT post.title, thread.title AS ttitle, post.threadid, post.pagetext, post.dateline, thread.forumid, post.postid, postparsed.pagetext_html FROM ".TABLE_PREFIX."post as post LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON thread.threadid = post.threadid LEFT JOIN " . TABLE_PREFIX . "postparsed AS postparsed ON postparsed.postid = post.postid WHERE post.visible != 2 AND parentid=0 GROUP BY post.postid ORDER BY post.postid ASC does anyone have a better more general way of getting the first post in every thread that is published? |
Why do you have the Group By line in there?
|
I just add it to ensure we only get one postid and no duplicates for that postid in case of some custom coding
|
All times are GMT. The time now is 08:16 AM. |
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:
|