![]() |
Question about query results.
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:
|
Code:
SELECT * FROM thread WHERE dateline >= $twentyfourago ORDER BY dateline ASC LIMIT 0,7 |
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.
|
Try using a sub-query like this,
PHP Code:
|
Perfect, thanks. :)
|
All times are GMT. The time now is 05:50 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:
|