Database error in vBulletin 3.6.5:
Invalid SQL:
SELECT (sum(tr.vote) DIV count(tr.threadid)) AS rate, sum(tr.vote) AS total, count(tr.threadid) AS votes, t.threadid, t.title
FROM threadrate AS tr
LEFT JOIN thread AS t ON (tr.threadid = t.threadid)
WHERE t.visible = 1 AND t.forumid IN (2, 11, 20, 4, 34, 5, 6, 35, 7, 8, 10, 22, 12, 44, 17, 43, 15, 16, 19, 37, 38, 39, 40, 41, 42, 32, 36)
GROUP BY tr.threadid
HAVING votes > 1
ORDER BY rate DESC, votes DESC LIMIT 10;
MySQL Error : 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 'DIV count(tr.threadid)) AS rate, sum(tr.vote) AS total, count(t
Error Number : 1064
Date : Thursday, April 12th 2007 @ 12:53:28 PM
Script :
http://www.beernweed.com/forums/statistics.php
Referrer :
http://www.beernweed.com/forums/index.php
IP Address : 81.77.74.63
Username : Yours Truly
Classname : vb_database
Ideas?