Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.7
-
Fix Version/s: 1.7
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Environment:Any
-
Database:Any
-
Affected Branches:MOODLE_17_STABLE
-
Fixed Branches:MOODLE_17_STABLE
Description
The glossary module, in its sql.php script (where everything db-related is more or less centralised), has a lot of SQL code that won't work properly in all the DBs. Detected this:
- LCASE/UCASE --> changing to lower/upper
- sql_as() --> kill them and deprecate the function (AS is mandatory for field aliases)
- REGEXP searches. Not supported by MSSQL and Oracle!
- LEFT/RIGHT --> changing to substr() or substring()
- SUBSTR --> changing to substr() or substring()
the last two functions perhaps require to build one sql_substr() function to return the proper function name, with parameters and everything else (don't forget to look if ADOdb gives us that!).
Tomorrow (later)