Swan
Thu 10th Jan '02, 4:45am
Today i got an email report complaining about a database error:
Invalid SQL:
SELECT DISTINCT user.*, session.userid AS sessionuserid FROM user
LEFT JOIN session ON (session.userid = user.userid
AND session.userid <> 0 AND user.invisible = 0 AND session.lastactivity>0)
WHERE user.userid IN() AND receivepm=1
GROUP BY user.userid ORDER BY username
mysql error: You have an error in your SQL syntax near ') AND receivepm=1
GROUP BY user.userid ORDER BY username' at line 5
mysql error number: 1064
Date: Thursday 10th of January 2002 03:33:29 AM
This is due to the IN() clause being empty. Browsing the code i found that there should be a list of buddies between the parenthesis ( .makecommas($bbuserinfo[buddylist]). ) so it looks this happens because user has no buddies... someone forgot to put a check for empty buddy lists or the problem lies elsewhere?
Thanks in advance for any answer!
p.s. btw i'm using vb 2.2.1 downloaded yesterday :)
Invalid SQL:
SELECT DISTINCT user.*, session.userid AS sessionuserid FROM user
LEFT JOIN session ON (session.userid = user.userid
AND session.userid <> 0 AND user.invisible = 0 AND session.lastactivity>0)
WHERE user.userid IN() AND receivepm=1
GROUP BY user.userid ORDER BY username
mysql error: You have an error in your SQL syntax near ') AND receivepm=1
GROUP BY user.userid ORDER BY username' at line 5
mysql error number: 1064
Date: Thursday 10th of January 2002 03:33:29 AM
This is due to the IN() clause being empty. Browsing the code i found that there should be a list of buddies between the parenthesis ( .makecommas($bbuserinfo[buddylist]). ) so it looks this happens because user has no buddies... someone forgot to put a check for empty buddy lists or the problem lies elsewhere?
Thanks in advance for any answer!
p.s. btw i'm using vb 2.2.1 downloaded yesterday :)