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

Exception when using placeholders in ad-hoc report

XMLWordPrintable

    • MOODLE_23_STABLE

      I've installed the Ad-hoc database queries report plugin (v2.2.1). I'm trying to use the following query, which contains a placeholder:

      SELECT c.fullname,c.shortname,c.idnumber FROM prefix_course c WHERE c.idnumber LIKE '%.:term' ORDER BY c.shortname,c.fullname

      The report interface recognizes the placeholder and allows me to enter a value. When I try to actually run the query, however, I get this:

      Error when executing the query: Error reading from database

      More information about this error

      Debug info:
      Error code: queryfailed
      Stack trace:
      line 467 of /lib/setuplib.php: moodle_exception thrown
      line 102 of /report/customsql/view.php: call to print_error()

      This is on a relatively clean Moodle 2.3.2 system. If I remove the WHERE clause containing the placeholder the query executes successfully.

            timhunt Tim Hunt
            cfulton Charles Fulton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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