Hey, is there a db function that gives me the last inserted id or better a query function that returns the new id directly?
I got a query excuted via DB::query('INSERT INTO...'); and need the id of the entry.
The return param doesn't give it. I know that I can get it with a new select query but, it isn't the best way I think.
Thx
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
DB::getGeneratedID($table);