Missing parenthesis in sql_substr(). MDL-16669

This commit is contained in:
stronk7
2008-10-28 17:57:51 +00:00
parent 9a4f9e334a
commit 40b5f6552b
+1 -1
View File
@@ -1410,7 +1410,7 @@ abstract class moodle_database {
throw new coding_exception('moodle_database::sql_substr() requires at least two parameters', 'Originaly this function was only returning name of SQL substring function, it now requires all parameters.');
}
if ($length === false) {
return "SUBSTR($expr, $start";
return "SUBSTR($expr, $start)";
} else {
return "SUBSTR($expr, $start, $length)";
}