From 2ec48e8484b51f18ce88cf989cf279dafb29e2c1 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 26 Oct 2010 08:28:56 +0000 Subject: [PATCH] MDL-24861 fixed text <> char comparison breaking MSSQL upgrade --- mod/data/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/data/db/upgrade.php b/mod/data/db/upgrade.php index 03f3123166e..1d85846155e 100644 --- a/mod/data/db/upgrade.php +++ b/mod/data/db/upgrade.php @@ -84,7 +84,7 @@ function xmldb_data_upgrade($oldversion) { JOIN {data} d ON d.id = r.dataid JOIN {modules} m ON m.name = 'data' JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = d.id) - WHERE c.content <> '$empty' AND c.content IS NOT NULL + WHERE ".$DB->sql_compare_text('c.content', 2)." <> '$empty' AND c.content IS NOT NULL AND (f.type = 'file' OR f.type = 'picture')"; $count = $DB->count_records_sql("SELECT COUNT('x') $sqlfrom");