Delete object logs from script - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Delete object logs from script (/showthread.php?tid=794) |
Delete object logs from script - Mirco - 17.05.2017 Hi, is there a way to delete all object logs from a script? Thanks! RE: Delete object logs from script - buuuudzik - 17.05.2017 Something like below: Code: db:delete('objectlog', { id > -1 }) RE: Delete object logs from script - admin - 18.05.2017 Code: db:query('DELETE FROM objectlog') RE: Delete object logs from script - Mirco - 18.05.2017 The istruction returns this error: Quote:User script:35: attempt to compare number with nil RE: Delete object logs from script - admin - 18.05.2017 Use the second code example, the first one is incorrect, though it can be used like this: Code: db:delete('objectlog') RE: Delete object logs from script - Mirco - 18.05.2017 Thank you! RE: Delete object logs from script - khalil - 25.07.2021 (18.05.2017, 07:38)admin Wrote: Use the second code example, the first one is incorrect, though it can be used like this: Hello Admin how to delete a specific object address logs? RE: Delete object logs from script - admin - 26.07.2021 Use this: Code: id = buslib.encodega('1/1/1') RE: Delete object logs from script - khalil - 26.07.2021 (26.07.2021, 10:16)admin Wrote: Use this: Thanks admin RE: Delete object logs from script - khalil - 01.09.2021 (26.07.2021, 10:16)admin Wrote: Use this: hello admin How to delete a specific period for a specific address regards, RE: Delete object logs from script - admin - 01.09.2021 Like this, you need to specify the min/max log time as UNIX timestamp: Code: id = buslib.encodega('1/1/1') RE: Delete object logs from script - khalil - 01.09.2021 (01.09.2021, 09:13)admin Wrote: Like this, you need to specify the min/max log time as UNIX timestamp: thank you, admin great where to learn about these query command? like if I want it to be depend on value db:query('DELETE FROM objectlog WHERE value<=0') doese this work? RE: Delete object logs from script - admin - 01.09.2021 It's more complicated. Value is stored raw format so it has to be decoded before comparison. Code: obj = grp.find('1/1/1') RE: Delete object logs from script - khalil - 01.09.2021 (01.09.2021, 12:08)admin Wrote: It's more complicated. Value is stored raw format so it has to be decoded before comparison.thank you admin is it easy to make it in general (delete all obj. logs <=0) RE: Delete object logs from script - admin - 01.09.2021 Try this: Code: rows = db:getall([[ RE: Delete object logs from script - khalil - 01.09.2021 (01.09.2021, 12:37)admin Wrote: Try this: thank you very much appreciate your help |