PDA


View Full Version : DB error for "Top 20 Rated" only


DougM
05-14-2005, 01:08 AM
I just noticed that using the "Top 20 Rated Links" feature from the "What's Popular" menu results in an error at http://www.japan-101.com/links . I haven't seen another report of this specific problem. Any ideas?

This is the email sent:

--------------------------------------
Database error in vBulletin 3.0.6:

Invalid SQL:
SELECT IF(votenum >= , votenum, 0) AS votenum, IF(votenum >= AND votenum> 0, votetotal / votenum, 0) AS voteavg, links.linkid
FROM links AS links

WHERE suspended = 0 AND valid = 1
ORDER BY voteavg DESC, votenum DESC
LIMIT 20

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 ' votenum, 0) AS votenum, IF(votenum >= AND votenum> 0, votetot

mysql error number: 1064
------------------------------

EDIT: I just noticed that "Top Rated Images" in Vba Gallery is doing the same thing. I know this was working last week and I haven't modified it. What could have happened?

Brian
05-14-2005, 11:56 AM
Admin CP => vBulletin Options => Poll and Thread Rating Options => Required Thread Rating Votes to Show Rating

Make sure that option is not blank.

DougM
05-14-2005, 02:20 PM
You got it Brian, all is well again.

Thanks