MDL-24861 fixed text <> char comparison breaking MSSQL upgrade

This commit is contained in:
Petr Skoda
2010-10-26 08:28:56 +00:00
parent c29e965920
commit 2ec48e8484
+1 -1
View File
@@ -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");