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

Found some wrong SQL sentences in the glossary module

    XMLWordPrintable

    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)

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Tester:
              Nobody
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                7/Nov/06