New function sql_substr() returns the proper substr() function for each DB
Merged from MOODLE_17_STABLE
This commit is contained in:
@@ -1570,6 +1570,17 @@ function sql_as() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the proper substr() function for each DB
|
||||
* Relies on ADOdb $db->substr property
|
||||
*/
|
||||
function sql_substr() {
|
||||
|
||||
global $db;
|
||||
|
||||
return $db->substr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the SQL text to be used to order by one TEXT (clob) column, because
|
||||
* some RDBMS doesn't support direct ordering of such fields.
|
||||
|
||||
Reference in New Issue
Block a user