Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.1.2
-
Fix Version/s: None
-
Component/s: Module: Journal
-
Environment:Moodle 2.1.2+, php 5.3.8, Windows 2008 R2, IIS 7.5 fastcgi, MS-SQL 2008
-
Database:Microsoft SQL
-
Workaround:
-
Difficulty:Easy
-
Affected Branches:MOODLE_21_STABLE
Description
After creating a journal activity I then click on the link to add journal entry and get the message 'error reading from database' and cannot go any further.
Debug info: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
|
SELECT DISTINCT u.id FROM mdl_journal_entries j
|
JOIN mdl_user u ON u.id = j.userid
|
WHERE j.journal = '232'
|
ORDER BY j.modified DESC
|
[array (
|
)]
|
Stack trace:
|
line 394 of \lib\dml\moodle_database.php: dml_read_exception thrown
|
line 255 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()
|
line 711 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
|
line 740 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()
|
line 628 of \mod\journal\lib.php: call to mssql_native_moodle_database->get_records_sql()
|
line 53 of \mod\journal\view.php: call to journal_count_entries()
|