The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Viewing all posts (not topics) in a forum.
Hey there,
Now, I know I can do... Code:
mysql> select threadid, title, dateline from thread where forumid="40"; But, how can I request all POSTS (threadid, postid, username, userid title, dateline) in those threads in a single MySQL query? Further to this, how can I do the above request but limit it to THREADS that started (and not when the last post was made to those threads) within the last XX days? Thanks |
#2
|
||||
|
||||
Okies, I figured out the first bit...
Code:
select post.threadid, post.postid, post.title, post.dateline as postdate, thread.dateline as threaddate from post, thread where post.threadid=thread.threadid && thread.forumid="40" order by threaddate desc, postdate asc; The results are first sorted by the date of the thread (most recent first), then by the date of the posts (oldest first). Now, how can I limit this to threads that were started within the last 30 days? (bear in mind, that there could be a post in the last 30 days which is on a 2 year old thread, and I don't want that to show). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|