PDA

View Full Version : MySQL Error 1064


The Equivocate
04-08-2005, 04:06 PM
I get this error when trying to view someone's profile:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.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 5

mysql error number: 1064

I've installed uShop, Trader Ratings, and vBookie, but I know for a fact that the profiles worked fine after installing uShop and TR. I went back and reinstalled vBookie but I'm still getting the same error.

sabret00the
04-08-2005, 04:41 PM
the $userid variable seems to be messsing for the query, you'll need to find out what it is and trace it back.

The Equivocate
04-08-2005, 06:21 PM
I don't know what that means... put it in dumbed-down terms. Would it have come from an error in my PHP editing or would it have been a problem with the installer & modifying the DB?

Marco van Herwaarden
04-08-2005, 06:29 PM
I would guess it is an error in your file edits.

The Equivocate
04-08-2005, 07:58 PM
That makes no sense to me, then, because I've installed these 3 hacks together on many other forums, but this one is giving me problems... could it have to do with the forums being 3.0.7?

tnguy3n
04-08-2005, 08:50 PM
Replace this line:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline

WITH:
SELECT user.userid, user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline

Marco van Herwaarden
04-08-2005, 08:52 PM
Replace this line:


WITH:Sorry but i don't see how that would fill in the blanks on the WHERE clause.

tnguy3n
04-08-2005, 09:10 PM
user.userid is called in WHERE clause, but it's not listed in SELECT one. Not sure if that's the reason it gives that error in sql statement.

The Equivocate
04-10-2005, 08:31 PM
We found out that you only get that error message when viewing the userid #1 's profile. Every other profile, regardless of if they are an admin or not, works.

Actually, the issue is when you try and view YOUR OWN profile. Any ideas?