PDA

View Full Version : Keep getting this SQL DB error emailed to me


mikeee
10-12-2011, 10:41 PM
Just upgraded to 4.1.7 and I am getting this error email about 40 times a day and I cant find the error, I visit the referring URL and it works fine. No complaints from the board members either.

Any ideas?

Database error in vBulletin 4.1.7:

Invalid SQL:

SELECT infractionid, infraction.userid, points, username
FROM CSR_infraction AS infraction
LEFT JOIN CSR_user AS user USING (userid)
WHERE expires <= 1318461771
AND expires <> 0
AND action = 0;

MySQL Error : Column 'points' in field list is ambiguous
Error Number : 1052
Request Date : Wednesday, October 12th 2011 @ 06:22:51 PM
Error Date : Wednesday, October 12th 2011 @ 06:22:51 PM
Script : http://www.MyWebsite.com/cron.php?rand=1318461424
Referrer :
IP Address : 150.70.75.37
Username : Unregistered
Classname : vB_Database
MySQL Version :

Lynne
10-12-2011, 11:21 PM
Sounds like you have added a field called points to your user table and that is causing issues with some default vb code. Change that query to say "infraction.points" instead of just "points" and it should be fine.

mikeee
10-12-2011, 11:53 PM
Thank you very much! Now... where do I find this query? Its not in cron.php and its not in includes/functions_cron.php either.

Lynne
10-13-2011, 02:51 AM
Just do a search in your files using your text editor (most should allow you to search directories). It is one of the cron jobs in the includes/cron directory.