Announcement

Collapse
No announcement yet.

Column 'reason' in field list is ambiguous Error Number : 1052

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Column 'reason' in field list is ambiguous Error Number : 1052

    Hello,


    I am getting this error while trying to access the banned users from the admincp. What query would fix the column problem below? I assume that the "reason" in the column is at two places somewhere and that the system can't pick the right one.

    Code:
     
    Database error in vBulletin 3.7.1:
    Invalid SQL:
    SELECT user.userid, user.username, user.usergroupid AS busergroupid,
    userban.usergroupid AS ousergroupid,
    IF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid,
    bandate, liftdate, reason,
    adminuser.userid AS adminid, adminuser.username AS adminname
    FROM user AS user
    INNER JOIN userban AS userban ON(userban.userid = user.userid)
    LEFT JOIN user AS adminuser ON(adminuser.userid = userban.adminid)
    WHERE user.usergroupid IN(14)
    AND userban.liftdate <> 0
    ORDER BY userban.liftdate ASC, user.username;
    MySQL Error : Column 'reason' in field list is ambiguous
    Error Number : 1052
    MySQL Error : Column 'reason' in field list is ambiguous
    Error Number : 1052
    Request Date : Saturday, May 31st 2008 @ 08:04:16 PM
    Error Date : Saturday, May 31st 2008 @ 08:04:16 PM
    Script : forums/modcp/banning.php?do=modify
    MySQL Version : 4.1.20

  • #2
    This usually means that you have installed an add-on that has added another 'reason' field to the database. You need to find out which add-ons this is and remove the changes it made to the db.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Steve,
      Thank you for the guidance. Problem fixed. I dropped the problematic column. It was a column in the user called the same. installed by a modification.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X