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

get_conversations get_in_or_equal with NOT

XMLWordPrintable

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

                      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 = ?
      

            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

              Created:
              Updated:
              Resolved:

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