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

Browse list of users not working with MSSQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      Moodle 1.7 beta with MSSQL 2005. Both database and Apache/PHP running on same windows XP box.
      Using freetds to get to MSSQL
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE

      Description

      • Fresh install of Moodle 1.7 beta on SQL 2005
      • Add 1 or 2 users
      • Go to http://localhost/admin/user.php and select "Browse a list of users"
      • Resulting page does not show actual users (though count of users is correct). INstead you get the message: "No users matching ' were found"

      Probable cause: I traced the SQL with SQL Profiler and one of the queries fauils because it containts the "LIMIT" keyword (which mssql does not support). The offending query is:

      SELECT id, username, email, firstname, lastname, city, country, lastaccess, confirmed
      FROM mdl_user
      WHERE deleted <> '1' AND username <> N'changeme' ORDER BY firstname ASC LIMIT 0,30

      The full .sql file capturing the sql output when you select 'browe users' is attached.

        Attachments

        1. browseusers.sql
          10 kB
          Chris Moffatt
        2. moodlebrowsebug.JPG
          98 kB
          Chris Moffatt

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              chrismof Chris Moffatt
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                7/Nov/06