From: tjhunt Date: Fri, 15 Sep 2006 14:00:30 +0000 (+0000) Subject: The ISNULL() function is a nasty mysql-ism. The standard SQL syntax is "xxx IS NULL... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f00b7f8d8eb58518b0c99c1ccdb376ce4598c481;p=moodle.git The ISNULL() function is a nasty mysql-ism. The standard SQL syntax is "xxx IS NULL". Even mysql supports this, whereas noone else supports the mysql syntax. --- diff --git a/lib/accesslib.php b/lib/accesslib.php index 95e37b00ca..10a4ef6f2c 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -2315,7 +2315,7 @@ function get_users_by_capability($context, $capability, $fields='u.*, ul.timeacc /// if context is a course, then construct sql for ul if ($context->aggregatelevel == CONTEXT_COURSE) { $courseid = $context->instanceid; - $coursesql = "AND (ul.courseid = $courseid OR ISNULL(ul.courseid))"; + $coursesql = "AND (ul.courseid = $courseid OR ul.courseid IS NULL)"; } else { $coursesql = ''; }