MDL-40266 improve emulate_bound_params() for sqlsrv driver
authorPetr Škoda <commits@skodak.org>
Mon, 1 Jul 2013 06:50:51 +0000 (08:50 +0200)
committerDan Poltawski <dan@moodle.com>
Tue, 2 Jul 2013 05:33:38 +0000 (13:33 +0800)
commit6d8558ed0679d2b9de01ad243aa68108d94dc1bc
treeddbe446bb666a3fa2b77e600c44997298ef2d955
parentc76c989420b984a86b1a290cf6fc5ad04be3d4c4
MDL-40266 improve emulate_bound_params() for sqlsrv driver

Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.

Credit goes to Martin Langhoff for original mysqli fix.
lib/dml/mssql_native_moodle_database.php