MDL-21264 sql_isnotempty fixed. Thanks Tim! Backported from HEAD

This commit is contained in:
Eloy Lafuente
2010-01-07 15:02:41 +00:00
parent f330bf4a42
commit 566c19c620
+3 -1
View File
@@ -1899,7 +1899,9 @@ function sql_isempty($tablename, $fieldname, $nullablefield, $textfield) {
break;
}
return ' ' . $sql . ' '; /// Adding spaces to avoid wrong SQLs due to concatenation
// Add spaces to avoid wrong SQLs due to concatenation.
// Add brackets to avoid operator precedence problems.
return ' (' . $sql . ') ';
}
/**