REMINDER
API Visual Insert - Results
-
Hi there, is it possbile to get some more information/feedback in the result json, i.e. the id of the record created?
-
Hello @Dick-Honing,
You can use "SELECT LAST_INSERT_ID();"
The LAST_INSERT_ID() function returns the AUTO_INCREMENT id of the last row that has been inserted or updated in a table.I hope I answer your question well.
Thank you and have a nice day
-
@David-Alimi said in API Visual Insert - Results:
SELECT LAST_INSERT_ID()
Hi David, thanks! ... but uh ... can I add this code to the API function? And if so, how? Thanks again and best regards - Dick
-
Hello @Dick-Honing,
I suppose your function is of type node and I need more information about your function
But a general example would be like this
var query =INSERT INTO users SET name='${name'};SELECT LAST_INSERT_ID();
;Thank you and have a nice day