Whenever I do an insert into the oracle database, I perform an insert, there is a trigger set up on this table to increment the ID to emulate MYSQL's autoincrement.
Straight after the INSERT sql I perform the following SQL to retrieve the last ID of the last inserted row:
$stmt = $this->query("SELECT {$sequence}.CURRVAL FROM DUAL", PDO::FETCH_COLUMN);
I then use this ID to perform an UPDATE to modify columns in the row.
My question is this safe in terms of concurrency?
My understanding is that SEQUENCES are session safe? What exactly is a session in this case?