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

Review all uses of DB->sql_empty() and take rid of the unnecessary ones

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      Before 2.x we needed to use the $DB->sql_empty() helper method in a lot of places (basically each time that one '' (empty string) was searched/used.

      But under 2.x a lot of those uses are not necessary anymore when the '' is used in any param (each moodle_database driver will handle it as necessary as part of the binding process).

      This reduces the use of the helper function exclusively to the places where '' is used within one SQL statement. The rest (params in general) should be changed to ''.

      This issue is about to perform that cleanup and test all the changes under Oracle (the only one needing the special handling of '') and another DB (mysql|postgres|mssql) to verify that everything continues working ok.

      Surely master only. Ciao

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: