The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I have a plugin that queries the 7 most replied-to threads in the last 24 hours and displays it in a separate section of my forum. The query shown below works exactly as I want it to, grabbing all the threads in the last 24 hours, ordering them by replycount and grabbing the top 7.
PHP Code:
|
|
#2
|
|||
|
|||
|
Code:
SELECT * FROM thread WHERE dateline >= $twentyfourago ORDER BY dateline ASC LIMIT 0,7 |
|
#3
|
|||
|
|||
|
Thanks, but that's not what I was asking. I want the top 7 most replied-to posts, and my current query grabs those. What I want to know is how I can take those 7 posts after I've grabbed them and reorder them by dateline. Sorry if that wasn't clear.
|
|
#4
|
||||
|
||||
|
Try using a sub-query like this,
PHP Code:
|
|
#5
|
|||
|
|||
|
Perfect, thanks.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|