From f00b7f8d8eb58518b0c99c1ccdb376ce4598c481 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 15 Sep 2006 14:00:30 +0000 Subject: [PATCH] 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. --- lib/accesslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = ''; } -- 2.39.5