Status
Not open for further replies.

Swank

New member
Hi,

I keep receiving the following database error resulting from points of vbcredits.

Database error in vBulletin 4.0.8:

Invalid SQL:

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

MySQL Error : Column 'points' in field list is ambiguous
Error Number : 1052
Request Date : Monday, November 15th 2010 @ 02:00:09 PM
Error Date : Monday, November 15th 2010 @ 02:00:09 PM
Script :
Referrer :
IP Address :
Username : Unregistered
Classname : vB_Database
MySQL Version :



I am getting this error about 5-8 times a day to my email. Please advise me how this can be resolved, thank you very much.
 
I had vBExperience installed before I installed vBCredits, but I had already disabled the vBExperience plugin from plugin manager. Could this still be the reason why I am receiving the above error? Do I need to complete delete all vbexperience files and db data before this can resolve the error?
 
vbcredits doesnt run that query (I checked just now to be certain), the points referenced in this error are infraction points.

in fact, i found the query at the top of infractions.php, a thoroughly vbulletin file :) please report this database error to them instead. i think the problem is that they didnt anticipate the user table to contain a points column (even though unrelated in definition)
 
Hmm so is this error happening because I changed the currency manager Columns to points? In the default they have this text field in vbcredits:

Column
After creation, this should stay the same even if you change the title later or loss of data may result. If you are manually creating this currency, the column should generally look like the title, except only with lowercase letters and underscores. If this column does not exist on the above table, it will be added.

I changed that from credits to points previously and then I started receiving this db error. After that I changed back to credits but somehow the error doesn't stop. I checked phpmyadmin and it seems the points field is still in there, another qn, if I change the column text field to points does it create an input data in any table with the word points?
 
What vbcredits does is check the table if the column you wish already exists. If it does, it will just use it, and mark not to mess with it should you delete the currency later. If it does not exist, it will add it and remove it if you delete the currency later.
The name of points as a column on the user table should not be off limits and you should still report that to vbulletin - they made an assumption and did not prefix column names within a join statement, which is not good practice. Besides, I'm pretty sure other points addons have used that column name in the past.
 
Status
Not open for further replies.
Back
Top