PHP Code:
I get this error sometimes in the forum .. Ideas ??
Database error in vBulletin 3.6.9:
Invalid SQL:
SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount,
thread.lastposter, thread.dateline, thread.postusername, thread.postuserid, thread.iconid,
IF(views<=replycount, replycount+1, views) AS views, thread.visible, thread.open,
user.username, user.userid, user.usergroupid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM thread AS thread
LEFT JOIN user AS user ON (user.username = thread.lastposter)
WHERE NOT ISNULL(thread.threadid) AND thread.visible = '1' AND thread.open != '10'
AND thread.forumid NOT IN(4,8,3,5,164,151,152,204,205,622,644,6,7,11,12,167,172,20,,4,8,3,5,164,151,152,204,205,622,644,6,7,11,12,165,166,167,172,221,222,0)
ORDER BY lastpost DESC
LIMIT 0, 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 '4,8,3,5,164,151,152,204,205,622,644,6,7,11,12,165,166,167,172,221,222,0)
' at line 9
Error Number : 1064
Date : Saturday, April 12th 2008 @ 11:11:39 AM
I am getting this same error. It only happens if a "guest" user (web crawler) tries to access a forum that does not exist. If I am logged in and go to the same link vbulletin gives the invalid forum error as it should. If I log out and try it I get the database error and it sends me the email error message. If I disable the marquee the problem goes away. It looks to me that for some reason something is adding an extra comma in the code. In your error above there is an extra comma between the 20 and the 4.