![]() |
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 :) |
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). |
All times are GMT. The time now is 06:06 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:
|