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

dmlib 2.0: get_records_list() doesn't work as in 1.9

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In Survey module: view.php

      line 122: $DB->get_records_list("survey_questions", "id", explode(',', $survey->questions))

      This request doesn't work because get_records_list do (moodle_database.php):
      SELECT * FROM mdl_survey_questions WHERE id = ? AND id = ? AND id = ?

      For this call, we would like something like "WHERE id = ? OR id = ? OR id = ?"
      or like in 1.9 "id IN ()"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              jerome Jérôme Mouneyrac
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10