26.11.2020, 07:26
This is possible but you will need to do direct db queries.
You can log all elements from a single plan (change 123 to your plan ID) like this:
Then you can insert new elements into a plan. Data must be a table containing all the required field apart from id which must be nil to add a new element:
You can log all elements from a single plan (change 123 to your plan ID) like this:
Code:
id = 123
items = db:getall('SELECT * FROM visobjects WHERE floor=?', id)
log(items)
Then you can insert new elements into a plan. Data must be a table containing all the required field apart from id which must be nil to add a new element:
Code:
db:insert('visobjects', item)