From: Will Budic Date: Tue, 3 Mar 2020 06:53:29 +0000 (+1100) Subject: Time sort view fix. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=80239aa457bcf8c980c306c72bb376575789fee4;p=LifeLog.git Time sort view fix. --- 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(