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

Health centre: Question categories should belong to a valid context solution has SQL that does not work in MySQL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.3
    • 1.9.4
    • Administration, Questions
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      See http://moodle.org/mod/forum/discuss.php?d=108442

      It generates SQL like

      DELETE FROM mdl_question_categories qc WHERE NOT EXISTS (SELECT * FROM mdl_question q WHERE q.category = qc.id) AND NOT EXISTS (SELECT * FROM mdl_context con WHERE qc.contextid = con.id)

      I think MySQL does not like table aliases in the DELETE FROM bit.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            timhunt Tim Hunt
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Jan/09