If I have a query like this in a function:
return queryExecute("
INSERT
INTO myTable
SET colName = :colValue
",
{
colValue = {
value = arguments.colValue,
sqltype = 'string'
}
}
);
Is there a way to return the `generated_key` value… I’ve tried adding `.GENERATED_KEY` at the end of the queryExecute but it just complains the column doesn't exist, which is fair enough… If I add a `result = 'myVar'` and remove the `return` and then `return myVar.GENERATED_KEY` that works fine… just trying to be clean and have a single call.
Thanks.