Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14679 META: DB layer 2.0
  3. MDL-17347

Need to put back the debug code that tells you if your first column is not unique in get_records_sql

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Database SQL/XMLDB
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

    Description

      I have just messed up by writing a complicated query where it turned out that the first column was not unique (again!).

      I notice that pgsql_native_moodle_database.php does not have the nice debugging code I wrote that tells you immediately if you make this mistake. Please can you add it (around like 650 - maybe other methods need it to).

      And in adodb_moodle_database.php (around like 470) the code is no longer effective, since we are doing $records = $rs->GetAssoc(true) - which, in isolation, seems like a good idea - but makes it impossible to detect this common programming error.

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              timhunt Tim Hunt
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Nov/10