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

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

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.5, 2.1.2, 2.2
    • Database SQL/XMLDB
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE

      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

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

              Created:
              Updated:
              Resolved:

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