Hi Mate, 
you did a google serach for a PHP command or script but sorting of ASC ( The result is sorted in ascending order) and DESC ( The result is sorted in descending order) are SQL Database commands.
Honestly, if I were you, I wouldn't mess around with the database myself and wouldn't necessarily try to use PHP in the functions and templates of the Codoforum system - you can scrap the whole script with it.
You have to have real knowledge about it and since I'm not good enough with it either, we should ask @admin or @adesh to help you here.
If you still want some more info on SQL sorting yourself, here's a quick explanation:
SQL ORDER BY syntax
The SQL syntax of a select query with ORDER BY can be structured as follows:
SELECT column name
FROM tablename
ORDER BY column name sorting parameters
The 'sorting parameter' can be built up according to the following structures:
ASC: The result is sorted in ascending order
DESC: The result is sorted in descending order
I hope that will explain it a bit to you.
Lets wait now for the Codo Team.
Kind regards, WebCrew 
Hi Mate, :)
you did a google serach for a PHP command or script but sorting of **ASC** ( The result is sorted in ascending order) and **DESC** ( The result is sorted in descending order) are **SQL** Database commands.
Honestly, if I were you, I wouldn't mess around with the database myself and wouldn't necessarily try to use PHP in the functions and templates of the Codoforum system - you can scrap the whole script with it.
You have to have real knowledge about it and since I'm not good enough with it either, we should ask @admin or @adesh to help you here.
----------------------------------
If you still want some more info on SQL sorting yourself, here's a quick explanation:
### SQL ORDER BY syntax
**The SQL syntax of a select query with ORDER BY can be structured as follows:**
**SELECT** column name
**FROM** tablename
**ORDER** BY column name sorting parameters
The '**sorting parameter**' can be built up according to the following structures:
**ASC**: The result is sorted in ascending order
**DESC**: The result is sorted in descending order
I hope that will explain it a bit to you.
Lets wait now for the Codo Team.
Kind regards, WebCrew ;)
https://net-twin.de/ Community for creative people - JOIN it Now please
https://github.com/WebCrew My GitHub account
https://sell-co.de/ Lots of Web-Tools and Utilities for free