![]() |
Order results in SQL query
Is there a way to ORDER BY 2 different parameters at one go ?
Kinda of like [sql] ORDER BY date desc AND postcounts desc [/sql] ? Not sure if this makes sense :D |
[sql]ORDER BY date DESC, postcounts DESC[/sql]That should do the trick for you.. :)
|
Thanks OK ! :D
|
If I'm not mistaken you can even do this:
[sql]ORDER BY date, postcounts DESC[/sql] By the way, hopefully you're not using date as a column in your table :surprised:, that could cause problems unless you use the ` around the column name like this: `date`. I've just found it easier to not use those keywords. |
All times are GMT. The time now is 03:18 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:
|