The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
[sql]ORDER BY date DESC, postcounts DESC[/sql]That should do the trick for you..
|
#3
|
||||
|
||||
Thanks OK !
|
#4
|
|||
|
|||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|