inverting log query to see most recent first

This commit is contained in:
Adam Brown 2022-09-04 11:33:13 +01:00
parent d406586afa
commit 4e3da03062

View File

@ -13,12 +13,14 @@ FROM dbEventLog;
selectLatestByLog:
SELECT id, tag, content, time(utcEpochSeconds,'unixepoch')
FROM dbEventLog
WHERE logParent = ?;
WHERE logParent = ?
ORDER BY utcEpochSeconds DESC;
selectLatestByLogFiltered:
SELECT id, tag, content, time(utcEpochSeconds,'unixepoch')
FROM dbEventLog
WHERE logParent = ? AND tag = ?;
WHERE logParent = ? AND tag = ?
ORDER BY utcEpochSeconds DESC;
insert:
INSERT INTO dbEventLog(tag, content, utcEpochSeconds, logParent)