Commit 229372aa authored by Neoony's avatar Neoony
Browse files

-Fix !cplogs date sorting

parent fd867ded
......@@ -221,7 +221,7 @@ function SQLcomeplayLogQuery(CPlogsArgs, user, message) {
else {
CPlogsArgs = CPlogsArgs * 10;
}
connection.query('SELECT CONVERT(DATE_FORMAT(DATETIME, "%d-%M-%Y %H:%i:%S"), CHAR) AS DATETIME, USER, CHANNEL, COMMAND, ACTION, MESSAGE FROM LobbyDiscord.' + LobbyDiscordTable + ' ORDER BY DATETIME DESC LIMIT ' + CPlogsArgs + ', 10;', function(error, results) {
connection.query('SELECT CONVERT(DATE_FORMAT(DATETIME, "%d-%M-%Y %H:%i:%S"), CHAR) AS DATETIME, USER, CHANNEL, COMMAND, ACTION, MESSAGE FROM LobbyDiscord.' + LobbyDiscordTable + ' ORDER BY YEAR(DATETIME) DESC, MONTH(DATETIME) DESC, DAY(DATETIME) DESC, HOUR(DATETIME) DESC, MINUTE(DATETIME) DESC, SECOND(DATETIME) DESC LIMIT ' + CPlogsArgs + ', 10;', function(error, results) {
if (error) {
GetDateAndTime();
console.log(DateAndTime + ': ' + 'Query CPlogs query error');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment