PDA

View Full Version : Database Error Question


hobbybox
03-18-2009, 12:30 PM
Im getting the following database error many, many times a day - however nothing on my site is not working correctly. Does anyone have any idea where I can find what is causing this problem?

Database error in vBulletin 3.8.1:

Invalid SQL:

UPDATE user AS user
SET user.ppuploads =
(
SELECT COUNT(userid)
FROM pp_photos
WHERE user.userid = 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 'SELECT COUNT(userid)
FROM pp_photos
WHERE user.userid
Error Number : 1064
Request Date : Wednesday, March 18th 2009 @ 09:12:45 AM
Error Date : Wednesday, March 18th 2009 @ 09:12:45 AM

dfc005
03-18-2009, 01:22 PM
Well, not sure if it's the problem but straight away I see you've got 2 semi-colons at the end of that query.

hobbybox
03-18-2009, 01:27 PM
I know that is probably the problem - however I cannot locate what file this problem is in. I know it sounds silly but I have looked and looked and am not sure what file I need to look into to correct it.

I was wondering if there is a way to search for some keywords or something to try to locate it.

Lynne
03-18-2009, 01:48 PM
Looking at the field names, it looks to be a modification for some photo something. So, disable your photo mods and see if the error goes away.

hobbybox
03-18-2009, 05:28 PM
found it - thanks