17.05.2017, 15:01
Hi, is there a way to delete all object logs from a script?
Thanks!
Thanks!
Delete object logs from script
|
17.05.2017, 15:01
Hi, is there a way to delete all object logs from a script?
Thanks!
17.05.2017, 18:59
Something like below:
Code: db:delete('objectlog', { id > -1 })
18.05.2017, 05:58
Code: db:query('DELETE FROM objectlog')
18.05.2017, 06:11
The istruction returns this error:
Quote:User script:35: attempt to compare number with nil
18.05.2017, 07:38
Use the second code example, the first one is incorrect, though it can be used like this:
Code: db:delete('objectlog')
18.05.2017, 08:47
Thank you!
25.07.2021, 15:00
(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?
Best Regards,
26.07.2021, 10:16
Use this:
Code: id = buslib.encodega('1/1/1')
26.07.2021, 10:39
(26.07.2021, 10:16)admin Wrote: Use this: Thanks admin
Best Regards,
01.09.2021, 08:07
(26.07.2021, 10:16)admin Wrote: Use this: hello admin How to delete a specific period for a specific address regards,
Best Regards,
01.09.2021, 09:13
Like this, you need to specify the min/max log time as UNIX timestamp:
Code: id = buslib.encodega('1/1/1') (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?
Best Regards,
01.09.2021, 12:08
It's more complicated. Value is stored raw format so it has to be decoded before comparison.
Code: obj = grp.find('1/1/1')
01.09.2021, 12:26
(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)
Best Regards,
01.09.2021, 12:37
Try this:
Code: rows = db:getall([[
01.09.2021, 12:40
(01.09.2021, 12:37)admin Wrote: Try this: thank you very much appreciate your help
Best Regards,
|
« Next Oldest | Next Newest »
|