Logic Machine Forum
ID of inserted row - 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: ID of inserted row (/showthread.php?tid=4729)



ID of inserted row - Leo681 - 22.04.2023

Hello.

Is it possible to get the ID of an inserted row 

res, err = db:insert('scripting', {
     params = '*/5 * * * *',
     type = 'scheduled',
     category = 'TEST',
     name = 'TEST,
      script  = SCRIPT
})
log (res,err)

I would like the ID of the inserted row.

Thanks


RE: ID of inserted row - Leo681 - 23.04.2023

Found it in another thread. db:getlastautoid()

Is there a reference manual of the db: class somewhere?


RE: ID of inserted row - admin - 24.04.2023

Docs: https://openrb.com/docs/db.htm