MDL-8232 - can't use = on TEXT colums with MSSQL - was breaking numerical question type upgrade.

This commit is contained in:
tjhunt 2007-03-14 21:07:37 +00:00
parent 9a0212da08
commit 2099d05dec

View File

@ -27,7 +27,7 @@ function xmldb_qtype_numerical_upgrade($oldversion=0) {
// from the empty string to *, to be like short answer questions.
if ($result && $oldversion < 2006121500) {
$result = set_field_select('question_answers', 'answer', '*',
sql_compare_text('answer') . " = '" . sql_empty() . "' AND question IN (SELECT id FROM {$CFG->prefix}question WHERE qtype = '" . NUMERICAL . "')");
sql_compare_text('answer') . " LIKE '" . sql_empty() . "' AND question IN (SELECT id FROM {$CFG->prefix}question WHERE qtype = '" . NUMERICAL . "')");
}
return $result;