Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2942

Error Reading from Database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Module: Questionnaire
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE

      Description

      bug related to mySQL database system?
      see http://moodle.org/mod/forum/discuss.php?d=175568

      Hi everyone,

      I've recently installed this module on my 2.0.1 installation (Windows, mySQL), and everything seemed to be working fine. I created a questionnaire, added questions, all good.

      But now, when I use MyMoodle, I get the following error message:
      Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR (l.course = 5 AND l.time > ) OR (l.course = 6 AND l.time > ) OR (l.course =' at line 1
      SELECT instance,cmid,l.course,COUNT(l.id) as count FROM log l JOIN course_modules cm ON cm.id = cmid JOIN questionnaire q ON cm.instance = q.id WHERE ((l.course = 7 AND l.time > ) OR (l.course = 5 AND l.time > ) OR (l.course = 6 AND l.time > ) OR (l.course = 3 AND l.time > ) OR (l.course = 2 AND l.time > ) OR (l.course = 8 AND l.time > ) OR (l.course = 9 AND l.time > ) ) AND l.module = 'questionnaire' AND action = 'submit' AND userid != 19 AND q.resp_view <> 1 GROUP BY cmid,l.course,instance
      [array (
      )]
      Stack trace:

      • line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      • line 775 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 811 of \mod\questionnaire\lib.php: call to mysqli_native_moodle_database->get_records_sql()
      • line 856 of \course\lib.php: call to questionnaire_print_overview()
      • line 107 of \blocks\course_overview\block_course_overview.php: call to print_overview()
      • line 279 of \blocks\moodleblock.class.php: call to block_course_overview->get_content()
      • line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
      • line 895 of \lib\blocklib.php: call to block_base->get_content_for_output()
      • line 947 of \lib\blocklib.php: call to block_manager->create_block_contents()
      • line 304 of \lib\blocklib.php: call to block_manager->ensure_content_created()
      • line 919 of \lib\outputrenderers.php: call to block_manager->get_content_for_region()
      • line 148 of \my\index.php: call to core_renderer->blocks_for_region()

      Any ideas?

        Attachments

          Activity

            People

            Assignee:
            mchurch Mike Churchward
            Reporter:
            rezeau Joseph Rézeau
            Participants:
            Component watchers:
            Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              1/Jul/11