MDL-33434 mssql: Improve handling of returned ids on insert.
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 30 May 2012 23:01:14 +0000 (01:01 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 30 May 2012 23:01:14 +0000 (01:01 +0200)
commita3fa993212fbee1fe6a1fb4f7b1069ba4595360a
tree9fd83f5aa3c549a4480b8ed50dd5c45fd52a74b7
parentcbdcdd473451db2bcea8a6a3d486d374fe8c9104
MDL-33434 mssql: Improve handling of returned ids on insert.

This commit moves from the batch SCOPE_IDENTITY() way to return
the inserted ids to the OUTPUT alternative (supported and
recommended since 2005). Also the handling of possible return
values is improved, with all the alternatives leading to expected results.
lib/dml/mssql_native_moodle_database.php