From 3f0c17b8efed1a4868d08d3dec87bf16e9481e17 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 26 Oct 2008 12:45:05 +0000 Subject: [PATCH] MDL-17020 dml: dollar bound query syntax support --- lib/dml/moodle_database.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/dml/moodle_database.php b/lib/dml/moodle_database.php index 9f8727a179b..d3c61258968 100644 --- a/lib/dml/moodle_database.php +++ b/lib/dml/moodle_database.php @@ -422,11 +422,18 @@ abstract class moodle_database { } else if ($target_type & SQL_PARAMS_NAMED) { return array($sql, $finalparams, SQL_PARAMS_NAMED); } else { // $type & SQL_PARAMS_DOLLAR - throw new dml_exception('boundsyntaxnotsupport'); + $sql = preg_replace_callback('/(?