Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-7268

Found some wrong SQL sentences in the glossary module

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.7
    • 1.7
    • Database SQL/XMLDB
    • None
    • Any
    • Any
    • MOODLE_17_STABLE
    • MOODLE_17_STABLE

      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)

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.