New function sql_substr() returns the proper substr() function for each DB

Merged from MOODLE_17_STABLE
This commit is contained in:
stronk7
2006-10-30 18:31:08 +00:00
parent 0db568393d
commit 06edab84e1
+11
View File
@@ -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.