|
I kinda think this should be broken into 2 tickets.
the second issue (needing to add 'as') is also hitting us during every cron on postgres. -eric
Mathieu Petit-Clair made changes - 25/Jan/08 11:21 AM
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 25/Jan/08 11:31 AM
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 25/Jan/08 11:32 AM
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 25/Jan/08 11:43 AM
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 25/Jan/08 11:43 AM
Latest commits should fix this issue. Thanks!
Mathieu Petit-Clair made changes - 25/Jan/08 11:44 AM
Just as reference for future:
http://docs.moodle.org/en/Development:Coding#Database_structures It enforces the use of the "AS" keyword for columns and forbid if for tables. It's the only cross-db combination. Ciao
Martin Dougiamas made changes - 06/Feb/08 12:29 PM
See problem at
Martin Dougiamas made changes - 06/Feb/08 12:30 PM
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 06/Feb/08 12:34 PM
It seems that the change from 'blog' to 'tag' table was incorrect (should be 'post' table, Mat has already fixed it now in CVS), and has resulted in dataloss on moodle.org (cron deleted a lot of tag instances). My standard backups don't have the data (because it was more than a week ago), I'm trying to source some older backups.
Mathieu Petit-Clair made changes - 11/Feb/08 02:11 PM
Mathieu Petit-Clair made changes - 11/Feb/08 02:11 PM
Should be fixed now.
Mathieu Petit-Clair made changes - 22/Feb/08 07:35 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<div class="notifytiny" style="text-align:center">ERROR: syntax error at or near "nr" at character 28<br /><br />
nr
SELECT tb.tagid , COUNT
FROM core_tag_instance ta
INNER JOIN core_tag_instance tb ON ta.itemid = tb.itemid
WHERE ta.tagid = 5
GROUP BY tb.tagid
ORDER BY nr DESC<ul style="text-align: left"><li>line 686 of lib/dmllib.php: call to debugging()</li><li>line 944 of lib/dmllib.php: call to get_recordset_sql()</li><li>line 854 of tag/lib.php: call to get_records_sql()</li><li>line 1137 of tag/lib.php: call to cache_correlated_tags()</li><li>line 339 of admin/cron.php: call to tag_cron()</li></ul></div>
Again the quick fix of course is to add 'as' to line 845 in tag/lib.php:
SELECT tb.tagid , COUNT
as nr
PS I would be happy to make these changes if required, as I will be submitting some other changes to the tag code for
MDL-11992(adding course tagging) next week (I hope).