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

Unable to use a named parameter more than once in a query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 2.0.2
    • Database SQL/XMLDB
    • None
    • Any
    • MOODLE_20_STABLE

      Attempting to use the same named parameter more than once in a query will result in the following error:

      ERROR: Incorrect number of query parameters. Expected 2, got 1.

      example of such a query: SELECT id FROM

      {user}

      WHERE firstname = ':search' OR lastname = ':search';

      As the parameters array passed to $DB->get_records are keyed on the named parameter it is not possible to supply the named parameter more than once.

            skodak Petr Skoda
            matt.clarkson Matt Clarkson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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