mirror of
https://github.com/moodle/moodle.git
synced 2025-04-09 02:12:22 +02:00
MDL-80286 datafield_date: cast field content to real when sorting.
This ensures we don't under/overflow the size of an integer in DB.
This commit is contained in:
parent
b1bb5671df
commit
de6c7d2975
@ -198,7 +198,7 @@ class data_field_date extends data_field_base {
|
||||
|
||||
function get_sort_sql($fieldname) {
|
||||
global $DB;
|
||||
return $DB->sql_cast_char2int($fieldname, true);
|
||||
return $DB->sql_cast_char2real($fieldname, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user