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

get_conversations get_in_or_equal with NOT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 3.6
    • 3.6
    • Messages

    Description

                      list ($insql, $inparams) = $DB->get_in_or_equal($favouriteconversationids, SQL_PARAMS_NAMED, 'favouriteids');
                      $favouritesql = $favourites ? " AND mc.id {$insql} " : " AND mc.id NOT {$insql} ";
      

      You should not use the "NOT" - please use the extra argument to get_in_or_equal.
      The get_in_or_equal function will return "= ?" or "<> ?" if there is only one array key. Your SQL will then become:

      AND mc.id NOT = ?
      

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Jake Dallimore Jake Dallimore
              David Monllaó David Monllaó
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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