Closed danbuntu closed 11 years ago
The insert() function returns the last inserted id.
can you give the syntax using insert() function to get the id and store it in a variable?
var id = lib.insert("books", {code: "B001", title: "Phantoms in the brain", author: "Ramachandran", year: 1999, copies: 10});
Hello
Is there a quick way to get the ID of the last inserted record? Or do I need to do an insert then a get all then get the highest ID?