Log in

View Full Version : Admincp Attachment Statistics MySQL Error


SpArKs85
04-18-2007, 08:04 PM
I'm getting this error and I have no idea what is causing it. The error appears under the normal Attachments => Attachment Statistics => Statistics box. I'm assuming it's related to the PM Attachments mod. But when I disable it, the error is still there. So I'm lost...

Any idea how to fix it?


Database error in vBulletin 3.6.5:

Invalid SQL:

SELECT attachmentid, attachment.dateline, attachment.postid, filename, counter,
user.userid, IF(user.userid<>0, user.username, post.username) AS username
FROM attachment AS attachment
LEFT JOIN user AS user ON (attachment.userid=user.userid)
LEFT JOIN post AS post ON (attachment.postid=post.postid)
ORDER BY counter DESC
LIMIT 5;

MySQL Error : Column 'counter' in field list is ambiguous
Error Number : 1052
Date : Wednesday, April 18th 2007 @ 09:56:55 PM
Script : http://www.gamesters-paradise.com/admincp/attachment.php?do=stats
Referrer : http://www.gamesters-paradise.com/admincp/index.php?do=nav
IP Address : 82.10.108.130
Username : SpArKs
Classname : vb_database

calorie
04-18-2007, 09:04 PM
vB 3.6.5 already has a counter field in the attachment table, and it's likely that some modification you installed added a counter field to either the user or post table. As such, MySQL doesn't know to which counter field the query refers. Find the modification that adds a counter field to the user or post table, and then ask the author of that modification for help.

SpArKs85
04-22-2007, 03:38 PM
That's the thing, I don't know which mod has done this. Disabling the mods installed doesn't make the error go away... how can I tell?

Thanks