PDA

View Full Version : MySQL Error, issue with upgrading



Finalfantasykid
Sun 22nd Apr '07, 7:26pm
http://www.ff-xiii.net/upload/showthread.php?p=45877#post45877

EDIT: this is what shows up when I am logged on:
Database error in vBulletin 3.6.5:


Invalid SQL:

SELECT
post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
user.*, userfield.*, usertextfield.*,
icon.title as icontitle, icon.iconpath,
avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,
deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,
editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason,
postparsed.pagetext_html, postparsed.hasimages,
sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid


FROM post AS post
LEFT JOIN user AS user ON(user.userid = post.userid)
LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
LEFT JOIN icon AS icon ON(icon.iconid = post.iconid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
LEFT JOIN deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND deletionlog.type = 'post')
LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 1 AND postparsed.languageid = 1)
LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 1 AND sigparsed.languageid = 1)
LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid)

WHERE post.postid IN (0,45872,45876,45885)
ORDER BY post.dateline;

MySQL Error : Column 'infractiongroupid' in field list is ambiguous
Error Number : 1052
Date : Sunday, April 22nd 2007 @ 03:28:02 PM
Script : http://www.ff-xiii.net/upload/showthread.php?p=45885
Referrer : http://www.ff-xiii.net/upload/index.php
IP Address : 75.153.174.235
Username : Finalfantasykid
Classname : vb_databaseAs you can see, there is a mysql error whenever a forum or thread is viewed. I have checked several other areas on the forum and they all appear to work just fine.

I checked in the database table 'post' under the column infractiongroupid and all the rows say '0'. What does it mean by it is ambiguous? Should it say something other than 0?
---

I have tried upgrading in the past and this has always happened when I try...

Steve Machol
Sun 22nd Apr '07, 7:29pm
MySQL Error : Column 'infractiongroupid' in field list is ambiguous

The most likely cause of this error is that you have installed an add-on that added an extra 'infractiongroupid' field to the database. Check your add-ons and find out exactly what changes each one made to the db.

Finalfantasykid
Sun 22nd Apr '07, 7:39pm
I actually have never installed any add-ons so that can't be the problem...

Steve Machol
Sun 22nd Apr '07, 7:47pm
Then it's a MySQL version bug. Which version of MySQL are you running?

Finalfantasykid
Sun 22nd Apr '07, 7:55pm
According to phpmyadmin I am running mysql 5.0.24a

EDIT: I think I fixed it.
What I did was delete the infractiongroupid column from the 'post' table and it seems to work now. I'm guessing I added that column at one time while trying to fix an error when I attempted to upgrade in the past. I just never deleted it after...