Re: [web2py] Re: sqlform insert row id

2021-07-01 Thread Javier Pepe
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-and-insert-update-delete In form.vars.id store Last ID inserted El jue., 1 de julio de 2021 15:47, Dave S escribió: > > > On Wednesday, June 30, 2021 at 11:35:29 PM UTC-7 Clemens wrote: > >> the insert returns the id of

[web2py] Re: sqlform insert row id

2021-07-01 Thread Dave S
On Wednesday, June 30, 2021 at 11:35:29 PM UTC-7 Clemens wrote: > the insert returns the id of the new record. > > new_id = db.table.insert(...) > > Have a try! > Well, yes, if you do the insert yourself, but when you're doing SQLFORM, it will do the insert. So you need it to return the new r