If you check the result of your INSERT statement, there is no last insert id. I’m not sure which “API” you referred to (Execute() is just a global function), but if you use the REST API’s “add” action to insert, the result is like { “success”: true, “version”: “15.0.0”, “cars”: { “ID”: 16, “Trademark”: 1, … } } which contains the new ID, see the topic REST API in the help file. If you Execute(), you do need another query to get the last insert id as required by databases.
i looked at the help file, event section.
i saw example of codes using Execute command, or ExecuteRow… so i learnt and re-use it.
My need is server-side.
My event is Row_Updated, so i just need to insert something in another table once all is updaded and i need to get the last id.
So now, i do 2 query :
one is : $result=Execute (“insert into other_table …)”;
second is : $result=ExecuteRow (“select max(id) from other_tables…”); and read the $result[0] to get my last id