-
Improvement
-
Resolution: Unresolved
-
Minor
-
2.0.3, 4.1.5, 4.2.2
-
Any
-
MOODLE_20_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
As detailed in this discussion: http://moodle.org/mod/forum/discuss.php?d=176081
When using $DB->get_record() to compare text field with a value, the following error is produced:
Comparisons of text column conditions are not allowed. Please use sql_compare_text() in your query.
As you don't write the SQL yourself when using get_record(), this message is useless.
Either get_record should make appropriate use of sql_compare_text() to cirumvent the problem for you,
Or the error message should be a coding error telling you to use a more appropriate $DB method such as get_record_select, allowing you to specify a where clause using sql_compare_text().
- has a non-specific relationship to
-
MDL-24863 MS SQL DB driver casting string to int breaks a query that should work, which breaks qtype_multichoice upgrade
-
- Closed
-