crazyace
02-12-2011, 02:31 AM
We use aMember to handle all of our subs. After updating to 4.1.1 we started to have database issues for new users trying to log into the forums.
Database error in vBulletin 4.1.1:
Invalid SQL:
SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend
FROM forum AS forum
LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = );
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 ')' at line 6
Error Number : 1064
Request Date : Friday, February 11th 2011 @ 10:10:43 PM
Error Date : Friday, February 11th 2011 @ 10:10:43 PM
Script : http://www.probotters.com/forum/index.php
Referrer : http://www.probotters.com/forum/login.php?do=login
IP Address : 173.89.12.6
Username : dtestd
Classname : vB_Database
MySQL Version :
-->
As you can see the issue is with this part of the code
AND userlist.userid = ); where the = is empty. After disabling Project Tools it worked like a charm again. So any ideas on how to solve this issue would be wonderful.
Database error in vBulletin 4.1.1:
Invalid SQL:
SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend
FROM forum AS forum
LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = );
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 ')' at line 6
Error Number : 1064
Request Date : Friday, February 11th 2011 @ 10:10:43 PM
Error Date : Friday, February 11th 2011 @ 10:10:43 PM
Script : http://www.probotters.com/forum/index.php
Referrer : http://www.probotters.com/forum/login.php?do=login
IP Address : 173.89.12.6
Username : dtestd
Classname : vB_Database
MySQL Version :
-->
As you can see the issue is with this part of the code
AND userlist.userid = ); where the = is empty. After disabling Project Tools it worked like a charm again. So any ideas on how to solve this issue would be wonderful.