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

Backup report fails due to 'ambiguous column name'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.9.10
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      Moodle 1.9.2+ (Build: 20080806)
      Apache/2.2.9 (Win32) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6
      Windows 2003 SP1
      SQL 2005 (via FreeTDS)
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When viewing Backup reports in Moodle, you receive the following error:

      Ambiguous column name 'laststarttime'.

      SELECT DISTINCT laststarttime,laststarttime FROM mdl_backup_log WHERE courseid = '16' ORDER BY laststarttime DESC
      ? line 686 of lib\dmllib.php: call to debugging()
      ? line 966 of lib\dmllib.php: call to get_recordset_sql()
      ? line 102 of admin\report\backups\index.php: call to get_records_sql()
      No logs have been found

      The fix simply appears to be removing the extraneous 'laststarttime' from the SQL query on line 99 of admin\report\backups\index.php.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Oct/10