]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Time sort view fix.
authorWill Budic <redacted>
Tue, 3 Mar 2020 06:53:29 +0000 (17:53 +1100)
committerWill Budic <redacted>
Tue, 3 Mar 2020 06:53:29 +0000 (17:53 +1100)
htdocs/cgi-bin/login_ctr.cgi
htdocs/cgi-bin/system/modules/Settings.pm

index d4e95c15e3bf489e1cfce6b5d4251e2c24af7d8f..ef02d337f633d60a7ac7aa6273bce69e943ec98b 100755 (executable)
@@ -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;');
index 6f76f0d803316ec0a272527032f5d28b7bca736f..455e571454cb1cba3ec76d5d2878d1979727ef76 100644 (file)
@@ -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(