Welcome Guest, Not a member yet? Register   Sign In
getting record id of upsert
#1

Hello!
When doing upserts, is there a tidy way of retrieving the primary key (e.g. id) of the affected record afterwards?
I realize that logic is possible to use either a query or $db->insertID() after the fact to find the ID, but it would be nice if, for example, insertID() returned the id regardless of the action all in one line.

Thanks!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB