This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

ID of inserted row
#1
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
Reply
#2
Found it in another thread. db:getlastautoid()

Is there a reference manual of the db: class somewhere?
Reply
#3
Docs: https://openrb.com/docs/db.htm
Reply


Forum Jump: