MDL-25276 dml - fix/implement sql_cast2int/real() across the 5 drivers. Tests passing.

This commit is contained in:
Eloy Lafuente
2010-11-18 01:27:49 +00:00
parent a018adf038
commit 9882b2c824
4 changed files with 38 additions and 2 deletions
+8
View File
@@ -1447,6 +1447,14 @@ class oci_native_moodle_database extends moodle_database {
}
}
public function sql_cast_char2real($fieldname, $text=false) {
if (!$text) {
return ' CAST(' . $fieldname . ' AS FLOAT) ';
} else {
return ' CAST(' . $this->sql_compare_text($fieldname) . ' AS FLOAT) ';
}
}
/**
* Returns 'LIKE' part of a query.
*