Quote:<error>
<dateline>1219123972</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1054 - Unknown column 'averagerating' in 'order clause'
Query:
SELECT t.*, t.username AS threadusername, u.username
FROM mybb_threads t
LEFT JOIN mybb_users u ON (u.uid = t.uid)
WHERE t.fid='11' AND t.visible='1'
ORDER BY t.sticky DESC, averagerating desc , t.totalratings DESC
LIMIT 0, 20
</message>
</error>
The column averagerating does not exist. The query can be found in the file forumdisplay.php (line 643).
2008-08-20, 12:54 PM (This post was last modified: 2008-08-20, 12:58 PM by Michael S..)
A user reported this issue in the german community. I'll ask him about that.
But I think it doesn't matter because if you search for "averagerating" in the files mysql_db_tables.php, pgsql_db_tables.php and sqlite_db_tables.php you get no result. But in the file forumdisplay.php you can find this:
Quote:<error>
<dateline>1219297785</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc
LIMIT 0, 20' at line 5
Query:
SELECT t.*, t.username AS threadusername, u.username
FROM mybb_threads t
LEFT JOIN mybb_users u ON (u.uid = t.uid)
WHERE t.fid='24' AND (t.visible='1' OR t.visible='0')
ORDER BY t.sticky DESC, t. desc
LIMIT 0, 20
</message>
</error>
Quote:<error>
<dateline>1219622893</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1054 - Unknown column 'averagerating' in 'order clause'
Query:
SELECT t.*, t.username AS threadusername, u.username
FROM mybb_threads t
LEFT JOIN mybb_users u ON (u.uid = t.uid)
WHERE t.fid='18' AND t.visible='1'
ORDER BY t.sticky DESC, averagerating asc , t.totalratings DESC
LIMIT 20, 20
</message>
</error>
One way to reproduce it is to disable thread ratings in the forum, then try to sort by rating. I could have sworn I reported that as a bug in one of the 1.2 betas... hmm :/