From 80239aa457bcf8c980c306c72bb376575789fee4 Mon Sep 17 00:00:00 2001 From: Will Budic Date: Tue, 3 Mar 2020 17:53:29 +1100 Subject: [PATCH] Time sort view fix. --- htdocs/cgi-bin/login_ctr.cgi | 2 ++ htdocs/cgi-bin/system/modules/Settings.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index d4e95c1..ef02d33 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -244,6 +244,8 @@ sub checkCreateTables { } $db->do('DROP TABLE LOG;'); + #v.1.8 Has fixes, time also properly to take into the sort. Not crucial to drop. + $db->do('DROP TABLE VW_LOG;');delete($curr_tables{'VW_LOG'}); $db->do(&Settings::createLOGStmt); $db->do('INSERT INTO LOG (ID_CAT, DATE, LOG, AMOUNT,AFLAG) SELECT ID_CAT, DATE, LOG, AMOUNT, AFLAG FROM life_log_login_ctr_temp_table ORDER by DATE;'); diff --git a/htdocs/cgi-bin/system/modules/Settings.pm b/htdocs/cgi-bin/system/modules/Settings.pm index 6f76f0d..455e571 100644 --- a/htdocs/cgi-bin/system/modules/Settings.pm +++ b/htdocs/cgi-bin/system/modules/Settings.pm @@ -108,7 +108,7 @@ sub createVW_LOGStmt { return qq( CREATE VIEW VW_LOG AS SELECT rowid as ID,*, (select count(rowid) from LOG as recount where a.rowid >= recount.rowid) as PID - FROM LOG as a ORDER BY DATE DESC;' + FROM LOG as a ORDER BY Date(DATE) DESC;' )} sub createAUTHStmt { return qq( -- 2.34.1