MDL-40266 improve emulate_bound_params() for mssql driver
authorPetr Škoda <commits@skodak.org>
Mon, 1 Jul 2013 06:52:03 +0000 (08:52 +0200)
committerDan Poltawski <dan@moodle.com>
Tue, 2 Jul 2013 05:33:38 +0000 (13:33 +0800)
commit7d2b47d2651887c5bde22c9bd1cc1f46eaa54d70
tree7de14a30108ee4151fcb4fdb81b66384b871613d
parent6d8558ed0679d2b9de01ad243aa68108d94dc1bc
MDL-40266 improve emulate_bound_params() for mssql 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/sqlsrv_native_moodle_database.php