25.10.2019, 07:03
You can create a copy of plan/widget like this:
Code:
oldid = 123
item = db:getrow('SELECT * FROM visfloors WHERE id=?', oldid)
item.id = nil
db:insert('visfloors', item)
newid = db:getlastautoid()